Skip to content

Commit

Permalink
Merge pull request #1466 from DavidElesTheFox/bugfix/fix-build-path
Browse files Browse the repository at this point in the history
Bug: Fix build issues during fetch_content usage
  • Loading branch information
ericniebler authored Jan 10, 2025
2 parents 2e87822 + 733064b commit cab1814
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ endif()
# - Download and initialize RAPIDS CMake helpers -----------------------------

# Fetch rapids-cmake
if(NOT EXISTS ${CMAKE_BINARY_DIR}/RAPIDS.cmake)
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
${CMAKE_CURRENT_BINARY_DIR}/RAPIDS.cmake)
endif()
# Initialize rapids-cmake
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/RAPIDS.cmake)
# utilities for generating export set package metadata
include(rapids-export)
# utilities for finding packages
Expand All @@ -37,11 +37,11 @@ include(rapids-cpm)
# - Project definition -------------------------------------------------------

# Define the project and set the version and languages
if(NOT EXISTS ${CMAKE_BINARY_DIR}/execution.bs)
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/execution.bs)
file(DOWNLOAD "https://raw.githubusercontent.com/cplusplus/sender-receiver/main/execution.bs"
${CMAKE_BINARY_DIR}/execution.bs)
${CMAKE_CURRENT_BINARY_DIR}/execution.bs)
endif()
file(STRINGS "${CMAKE_BINARY_DIR}/execution.bs" STD_EXECUTION_BS_REVISION_LINE REGEX "Revision: [0-9]+")
file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/execution.bs" STD_EXECUTION_BS_REVISION_LINE REGEX "Revision: [0-9]+")
string(REGEX REPLACE "Revision: ([0-9]+)" "\\1" STD_EXECUTION_BS_REVISION ${STD_EXECUTION_BS_REVISION_LINE})

# nvc++ isn't supported by (s)ccache yet, so unset these before the `project()`
Expand Down Expand Up @@ -164,9 +164,9 @@ PUBLIC
# stdexec_version_config.hpp is generated by rapids' script
FILE_SET version_config
TYPE HEADERS
BASE_DIRS ${CMAKE_BINARY_DIR}/include
BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include
FILES
${CMAKE_BINARY_DIR}/include/stdexec_version_config.hpp
${CMAKE_CURRENT_BINARY_DIR}/include/stdexec_version_config.hpp
)
list(APPEND stdexec_export_targets stdexec)

Expand Down

0 comments on commit cab1814

Please sign in to comment.