summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-21 12:45:03 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-21 12:45:03 (GMT)
commit2a28f085a5c19c90735c912a6b5a26d3984d2717 (patch)
tree7086b133a46d66b7d178737549ccfc1f6db5d35b /Modules
parentb2289ff6542b79772e874c6dba157f72bb17c8be (diff)
parent0ed22502a6057f989bc7855a5a69e5171e013048 (diff)
downloadCMake-2a28f085a5c19c90735c912a6b5a26d3984d2717.zip
CMake-2a28f085a5c19c90735c912a6b5a26d3984d2717.tar.gz
CMake-2a28f085a5c19c90735c912a6b5a26d3984d2717.tar.bz2
Merge topic 'FindCUDA.cmake/Fix-MakeDirDuringSeparableCompilation'
0ed22502 FindCUDA: Create output dir while compiling intermediate link file (#15016)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 1802e61..e8e1fb1 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1585,10 +1585,12 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
COMMENT "Building NVCC intermediate link file ${output_file_relative_path}"
)
else()
+ get_filename_component(output_file_dir "${output_file}" DIRECTORY)
add_custom_command(
TARGET ${cuda_target}
PRE_LINK
COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}"
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}"
COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}"
)
endif()