-
-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1798cbc
commit f34103e
Showing
4 changed files
with
70 additions
and
43 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
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 |
---|---|---|
@@ -1,34 +1,37 @@ | ||
if(STDEXEC_ROOT AND NOT Stdexec_ROOT) | ||
set(Stdexec_ROOT | ||
${STDEXEC_ROOT} | ||
CACHE PATH "STDEXEC base directory" | ||
) | ||
unset(STDEXEC_ROOT CACHE) | ||
endif() | ||
# Copyright (c) 2024 Isidoros Tsaousis-Seiras | ||
# | ||
# SPDX-License-Identifier: BSL-1.0 | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
if(HPX_WITH_FETCH_STDEXEC AND NOT Stdexec_ROOT) | ||
hpx_info( | ||
"HPX_WITH_FETCH_STDEXEC=${HPX_WITH_FETCH_STDEXEC}, Stdexec will be fetched using CMake's FetchContent." | ||
) | ||
if(UNIX) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
Stdexec | ||
GIT_REPOSITORY https://github.com/NVIDIA/stdexec.git | ||
GIT_TAG main | ||
if(HPX_WITH_STDEXEC AND NOT TARGET STDEXEC::stdexec) | ||
hpx_add_config_define(HPX_HAVE_STDEXEC) | ||
|
||
if(HPX_WITH_FETCH_STDEXEC) | ||
hpx_info( | ||
"HPX_WITH_FETCH_STDEXEC=${HPX_WITH_FETCH_STDEXEC}, Stdexec will be fetched using CMake's FetchContent." | ||
) | ||
FetchContent_MakeAvailable(Stdexec) | ||
endif() | ||
if(UNIX) | ||
include(FetchContent) | ||
message("FETCHING STDEXEC") | ||
FetchContent_Declare( | ||
Stdexec | ||
GIT_REPOSITORY https://github.com/NVIDIA/stdexec.git | ||
GIT_TAG ${HPX_WITH_STDEXEC_TAG} | ||
) | ||
FetchContent_MakeAvailable(Stdexec) | ||
endif() | ||
|
||
add_library(STDEXEC::stdexec INTERFACE IMPORTED) | ||
target_include_directories(STDEXEC::stdexec INTERFACE ${stdexec_SOURCE_DIR}/include) | ||
target_link_libraries(STDEXEC::stdexec INTERFACE ${Stdexec_LIBRARY}) | ||
elseif(HPX_WITH_STDEXEC) | ||
find_package(Stdexec REQUIRED) | ||
# add_library(STDEXEC::stdexec INTERFACE IMPORTED) | ||
# target_include_directories(STDEXEC::stdexec INTERFACE ${stdexec_SOURCE_DIR}) | ||
# target_link_libraries(STDEXEC::stdexec INTERFACE ${Stdexec_LIBRARY}) | ||
else() | ||
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" | ||
) | ||
if(NOT Stdexec_FOUND) | ||
hpx_error( | ||
"Stdexec could not be found, please specify Stdexec_ROOT to point to the correct location" | ||
) | ||
endif() | ||
endif() | ||
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