File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -227,10 +227,8 @@ function(cub_add_test target_name_var test_name test_src cub_target launcher_id)
227227 endif () # CUB_SEPARATE_CATCH2
228228
229229 if ("${test_target} " MATCHES "nvrtc" )
230- target_compile_definitions (${test_target} PRIVATE NVRTC_CUB_PATH="-I${CMAKE_SOURCE_DIR} /cub" )
231- target_compile_definitions (${test_target} PRIVATE NVRTC_THRUST_PATH="-I${CMAKE_SOURCE_DIR} /thrust" )
232- target_compile_definitions (${test_target} PRIVATE NVRTC_LIBCUDACXX_PATH="-I${CMAKE_SOURCE_DIR} /libcudacxx/include" )
233- target_compile_definitions (${test_target} PRIVATE NVRTC_CTK_PATH="-I${CUDAToolkit_INCLUDE_DIRS} " )
230+ configure_file ("cmake/nvrtc_args.h.in" ${CMAKE_CURRENT_BINARY_DIR} /nvrtc_args.h)
231+ target_include_directories (${test_target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} )
234232 endif ()
235233
236234 if ("${test_target} " MATCHES "test.iterator" )
Original file line number Diff line number Diff line change 3131
3232#include < c2h/catch2_test_helper.h>
3333#include < nvrtc.h>
34+ #include < nvrtc_args.h>
3435
3536TEST_CASE (" Test nvrtc" , " [test][nvrtc]" )
3637{
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ const char * NVRTC_CUB_PATH = "-I@CMAKE_SOURCE_DIR@/cub" ;
4+ const char * NVRTC_THRUST_PATH = "-I@CMAKE_SOURCE_DIR@/thrust" ;
5+ const char * NVRTC_LIBCUDACXX_PATH = "-I@CMAKE_SOURCE_DIR@/libcudacxx/include" ;
6+ const char * NVRTC_CTK_PATH = "-I@CUDAToolkit_INCLUDE_DIRS@" ;
You can’t perform that action at this time.
0 commit comments