summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-06 12:20:49 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-08-06 12:20:54 (GMT)
commit7142041abdebbdc677f7f859b03e12f68b8d0825 (patch)
tree4051e68e1930a70f7f0d1c7cf61702871a680212 /Modules
parent117d9f557042aa3a178e059cb038eaf0cb399b0a (diff)
parent37ba34c0b0270a09ca935d271f1742aea219070f (diff)
downloadCMake-7142041abdebbdc677f7f859b03e12f68b8d0825.zip
CMake-7142041abdebbdc677f7f859b03e12f68b8d0825.tar.gz
CMake-7142041abdebbdc677f7f859b03e12f68b8d0825.tar.bz2
Merge topic 'cuda-arch-version'
37ba34c0b0 FindCUDA/select_compute_arch: Restore two-component CUDA_VERSION Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2251
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDA/select_compute_arch.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/FindCUDA/select_compute_arch.cmake b/Modules/FindCUDA/select_compute_arch.cmake
index 22c04df..cf4fc39 100644
--- a/Modules/FindCUDA/select_compute_arch.cmake
+++ b/Modules/FindCUDA/select_compute_arch.cmake
@@ -18,8 +18,9 @@
#
if(CMAKE_CUDA_COMPILER_LOADED) # CUDA as a language
- if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
- set(CUDA_VERSION "${CMAKE_CUDA_COMPILER_VERSION}")
+ if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA"
+ AND CMAKE_CUDA_COMPILER_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
+ set(CUDA_VERSION "${CMAKE_MATCH_1}")
endif()
endif()