Merge topic 'FindCUDA-verbatim'

72a97b7a FindCUDA: Fix regression in separate compilation (#16027)
This commit is contained in:
Brad King 2016-03-23 11:19:28 -04:00 committed by CMake Topic Stage
commit f29fd5bf69
1 changed files with 6 additions and 1 deletions

View File

@ -1551,7 +1551,12 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
list( FIND nvcc_flags "-ccbin" ccbin_found0 ) list( FIND nvcc_flags "-ccbin" ccbin_found0 )
list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 ) list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER ) if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
# Match VERBATIM check below.
if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)")
list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"") list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
else()
list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}")
endif()
endif() endif()
# Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS* # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS*