summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDA.cmake
diff options
context:
space:
mode:
authorJames Bigler <jamesbigler@gmail.com>2010-06-15 16:03:40 (GMT)
committerJames Bigler <jamesbigler@gmail.com>2010-06-15 16:03:40 (GMT)
commit1d5554201f725d3158e05c1a91ff09fab1633b26 (patch)
tree2395aa1f9990a563f1ded0cf2fdaa3f4ceeedd25 /Modules/FindCUDA.cmake
parent0d30e3fe91717f519722a71470a5180c13818a2a (diff)
downloadCMake-1d5554201f725d3158e05c1a91ff09fab1633b26.zip
CMake-1d5554201f725d3158e05c1a91ff09fab1633b26.tar.gz
CMake-1d5554201f725d3158e05c1a91ff09fab1633b26.tar.bz2
CUDA_VERSION variable passed to REGEX needs quotes to work when not defined.
Diffstat (limited to 'Modules/FindCUDA.cmake')
-rw-r--r--Modules/FindCUDA.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 2c2e9fd..17da9e9 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -486,8 +486,8 @@ if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION)
mark_as_advanced(CUDA_VERSION)
else()
# Need to set these based off of the cached value
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${CUDA_VERSION})
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${CUDA_VERSION})
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}")
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}")
endif()
# Always set this convenience variable