summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake4
-rw-r--r--Modules/FindCUDA.cmake7
2 files changed, 9 insertions, 2 deletions
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 206ea7a..5e5302f 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -241,8 +241,10 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
else()
message(FATAL_ERROR "INSTALL_PREFIX must be an absolute path")
endif()
- else()
+ elseif(IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
set(installPrefix "${CMAKE_INSTALL_PREFIX}")
+ else()
+ get_filename_component(installPrefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
endif()
if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
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*