diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCUDA.cmake | 2 | ||||
-rw-r--r-- | Modules/FindCUDA/run_nvcc.cmake | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index a41fae2..34fcb97 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1027,6 +1027,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) ${main_dep} DEPENDS ${CUDA_NVCC_DEPEND} DEPENDS ${custom_target_script} + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" COMMAND ${CMAKE_COMMAND} ARGS -D verbose:BOOL=${verbose_output} ${ccbin_flags} diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake index 2011e22..4a9a7d4 100644 --- a/Modules/FindCUDA/run_nvcc.cmake +++ b/Modules/FindCUDA/run_nvcc.cmake @@ -150,12 +150,6 @@ cuda_execute_process( COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" ) -# Make sure the output directory is present -cuda_execute_process( - "Creating output directory: ${generated_file_path}" - COMMAND "${CMAKE_COMMAND}" -E make_directory "${generated_file_path}" - ) - # Generate the dependency file cuda_execute_process( "Generating dependency file: ${NVCC_generated_dependency_file}" |