Skip to content

Commit b5b7120

Browse files
fix #7245: switch Stdexec FetchContent_Populate to FetchContent_MakeAvailable
1 parent 3735f50 commit b5b7120

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

cmake/HPX_SetupStdexec.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ if(HPX_WITH_FETCH_STDEXEC)
2222
)
2323

2424
include(FetchContent)
25+
# We only consume stdexec's headers; HPX wraps them with its own `Stdexec`
26+
# INTERFACE target below. SOURCE_SUBDIR points at a non-existent path so
27+
# FetchContent_MakeAvailable does not call add_subdirectory on stdexec's own
28+
# CMakeLists.txt, which would otherwise pull in stdexec's tests/examples and
29+
# competing targets.
2530
fetchcontent_declare(
2631
Stdexec
2732
GIT_REPOSITORY https://github.com/NVIDIA/stdexec.git
2833
GIT_TAG ${HPX_WITH_STDEXEC_TAG}
34+
SOURCE_SUBDIR _hpx_skip_stdexec_cmakelists
2935
)
3036

31-
fetchcontent_getproperties(Stdexec)
32-
if(NOT Stdexec_POPULATED)
33-
fetchcontent_populate(Stdexec)
34-
endif()
37+
fetchcontent_makeavailable(Stdexec)
3538
set(Stdexec_ROOT ${stdexec_SOURCE_DIR})
3639

3740
add_library(Stdexec INTERFACE)

0 commit comments

Comments
 (0)