-
-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Stdexec to the build system (will be formalized later)
- Loading branch information
1 parent
9c53b99
commit 8826f04
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
if(NOT TARGET STDEXEC::stdexec) | ||
# print out STDEXEC_ROOT | ||
message(STATUS "Stdexec_ROOT: ${Stdexec_ROOT}") | ||
set(Stdexec_ROOT ${Stdexec_ROOT}) | ||
|
||
find_path( | ||
Stdexec_INCLUDE_DIR stdexec | ||
HINTS "${Stdexec_ROOT}" ENV STDEXEC_ROOT | ||
PATH_SUFFIXES include | ||
) | ||
|
||
if (NOT Stdexec_INCLUDE_DIR) | ||
message(FATAL_ERROR "stdexec not found") | ||
endif() | ||
|
||
add_library(STDEXEC::stdexec INTERFACE IMPORTED) | ||
target_include_directories(STDEXEC::stdexec INTERFACE ${Stdexec_INCLUDE_DIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args( | ||
Stdexec | ||
REQUIRED_VARS Stdexec_INCLUDE_DIR | ||
VERSION_VAR "1.0" | ||
FOUND_VAR Stdexec_FOUND | ||
) | ||
|
||
mark_as_advanced(Stdexec_INCLUDE_DIR Stdexec_ROOT) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
|
||
if(STDEXEC_ROOT AND NOT Stdexec_ROOT) | ||
set(Stdexec_ROOT | ||
${STDEXEC_ROOT} | ||
CACHE PATH "STDEXEC base directory" | ||
) | ||
unset(STDEXEC_ROOT CACHE) | ||
endif() | ||
|
||
find_package(Stdexec REQUIRED) | ||
|
||
if(NOT Stdexec_FOUND) | ||
hpx_error( | ||
"Stdexec could not be found, please specify Stdexec_ROOT to point to the correct location" | ||
) | ||
endif() |