diff options
author | Brad King <brad.king@kitware.com> | 2015-01-11 17:00:28 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-11 17:00:28 (GMT) |
commit | 56324568cf24263f23523caf4dc6a85323c0d56d (patch) | |
tree | 1c4d594bd730220895303b8129beed6f8a6e95e4 /Modules | |
parent | 20d60c636116c55bfeaa7ebd02045fafe0b96808 (diff) | |
parent | b4e54f9b8c748f78d16e9da055a7e0436d7654ef (diff) | |
download | CMake-56324568cf24263f23523caf4dc6a85323c0d56d.zip CMake-56324568cf24263f23523caf4dc6a85323c0d56d.tar.gz CMake-56324568cf24263f23523caf4dc6a85323c0d56d.tar.bz2 |
Merge topic 'FindCUDA.cmake/UseCMAKE_CXX_FLAGS_separableCompilation'
b4e54f9b FindCUDA: Add relevant CMAKE_{C,CXX}_FLAGS for separable compilation
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCUDA.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index ecfc781..4f1f09a 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1423,7 +1423,8 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER ) list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"") endif() - # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} + + # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS* set(config_specific_flags) set(flags) foreach(config ${CUDA_configuration_types}) @@ -1438,6 +1439,13 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options list(APPEND flags $<$<CONFIG:${config}>:-Xcompiler> $<$<CONFIG:${config}>:${f}>) endforeach() endforeach() + # Add CMAKE_${CUDA_C_OR_CXX}_FLAGS + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags ${CMAKE_${CUDA_C_OR_CXX}_FLAGS}) + foreach(f ${important_host_flags}) + list(APPEND flags -Xcompiler ${f}) + endforeach() + # Add our general CUDA_NVCC_FLAGS with the configuration specifig flags set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags}) |