Skip to content

Commit

Permalink
correct default fetching on cpp20
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorostsa committed May 23, 2024
1 parent 40285e1 commit 74c1d13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ hpx_option(
ADVANCED
)

if(HPX_WITH_FETCH_STDEXEC)
if(HPX_WITH_FETCH_STDEXEC OR HPX_WITH_CXX_STANDARD GREATER_EQUAL 20)
hpx_option(
HPX_WITH_STDEXEC_TAG STRING "STDEXEC repository tag or branch" "main"
CATEGORY "Executor"
Expand Down
7 changes: 6 additions & 1 deletion cmake/HPX_SetupStdexec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ if(Stdexec_ROOT
hpx_warn(
"Both Stdexec_ROOT and HPX_WITH_FETCH_STDEXEC are provided. HPX_WITH_FETCH_STDEXEC is set to OFF."
)
elseif(NOT Stdexec_ROOT AND NOT HPX_WITH_FETCH_STDEXEC)
hpx_warn(
"Neither Stdexec_ROOT nor HPX_WITH_FETCH_STDEXEC are provided. HPX_WITH_FETCH_STDEXEC is defaulted to ON."
)
set(HPX_WITH_FETCH_STDEXEC ON)
endif()
elseif(HPX_WITH_STDEXEC)
hpx_error(
Expand All @@ -46,7 +51,7 @@ if(HPX_WITH_STDEXEC AND NOT TARGET STDEXEC::stdexec)
)
if(UNIX)
include(FetchContent)
message("FETCHING STDEXEC")
message("FETCHING STDEXEC TAG: ${HPX_WITH_STDEXEC_TAG}")

fetchcontent_declare(
Stdexec
Expand Down

0 comments on commit 74c1d13

Please sign in to comment.