diff --git a/cmake/experiments/cuda_module_loading_lazy.cmake b/cmake/experiments/cuda_module_loading_lazy.cmake index a13af61af6512f425105d06465e9d093b624e270..f6da0771be0c081226c284775ef2f2c9528030f4 100644 --- a/cmake/experiments/cuda_module_loading_lazy.cmake +++ b/cmake/experiments/cuda_module_loading_lazy.cmake @@ -45,6 +45,9 @@ if(LINUX) CACHE BOOL "" FORCE) set(CMAKE_CUDA_FLAGS "--cudart shared") enable_language(CUDA) + set(CMAKE_CUDA_COMPILER + "${CMAKE_SOURCE_DIR}/tools/nvcc_lazy" + CACHE FILEPATH "" FORCE) execute_process( COMMAND "rm" "-rf" "${CMAKE_SOURCE_DIR}/tools/nvcc_lazy" COMMAND "chmod" "755" "${CMAKE_SOURCE_DIR}/tools/nvcc_lazy.sh" @@ -54,7 +57,4 @@ if(LINUX) set(CUDA_NVCC_EXECUTABLE "${CMAKE_SOURCE_DIR}/tools/nvcc_lazy" CACHE FILEPATH "" FORCE) - set(CMAKE_CUDA_COMPILER - "${CMAKE_SOURCE_DIR}/tools/nvcc_lazy" - CACHE FILEPATH "" FORCE) endif()