Files
nvbench/cmake/NVBenchRapidsCMake.cmake
Allison Piper 109449438b Use the new(ish) PREFIX option of rapids-cmake version, git revision header utils.
Generate macros prefixed with NVBENCH instead of redefining them from NVBench.
2025-04-15 20:33:06 +00:00

29 lines
786 B
CMake

# Called before project(...)
macro(nvbench_load_rapids_cmake)
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/NVBENCH_RAPIDS.cmake")
file(DOWNLOAD
https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-25.04/RAPIDS.cmake
"${CMAKE_CURRENT_BINARY_DIR}/NVBENCH_RAPIDS.cmake"
)
endif()
include("${CMAKE_CURRENT_BINARY_DIR}/NVBENCH_RAPIDS.cmake")
include(rapids-cmake)
include(rapids-cpm)
include(rapids-cuda)
include(rapids-export)
include(rapids-find)
rapids_cuda_init_architectures(NVBench)
endmacro()
# Called after project(...)
macro(nvbench_init_rapids_cmake)
rapids_cmake_build_type(Release)
rapids_cmake_write_version_file(
"${NVBench_BINARY_DIR}/nvbench/detail/version.cuh"
PREFIX "NVBENCH"
)
rapids_cpm_init()
endmacro()