summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-23 15:19:28 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-23 15:19:28 (GMT)
commitf29fd5bf69d5bcf5b4e23621669142fd99991df0 (patch)
tree7e492f95c7091d537368f5ccfe79639828ee5e0b /Modules
parent405766757c10e6e6cfeddf6ae01ab6877cfc5a6d (diff)
parent72a97b7a761b46fd1668e3ae81dd9322972f4cb3 (diff)
downloadCMake-f29fd5bf69d5bcf5b4e23621669142fd99991df0.zip
CMake-f29fd5bf69d5bcf5b4e23621669142fd99991df0.tar.gz
CMake-f29fd5bf69d5bcf5b4e23621669142fd99991df0.tar.bz2
Merge topic 'FindCUDA-verbatim'
72a97b7a FindCUDA: Fix regression in separate compilation (#16027)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 47c03f3..fe8b18e 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -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 "--compiler-bindir" ccbin_found1 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
- list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
+ # Match VERBATIM check below.
+ if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)")
+ list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
+ else()
+ list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}")
+ endif()
endif()
# Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS*