[test-suite, CUDA] Only consider the end of path as the version
Otherwise cmake trips on /some/path-0/cuda-1.2 and picks '0' as the version.
diff --git a/External/CUDA/CMakeLists.txt b/External/CUDA/CMakeLists.txt
index a34caef..2c48843 100644
--- a/External/CUDA/CMakeLists.txt
+++ b/External/CUDA/CMakeLists.txt
@@ -36,7 +36,7 @@
# Output:
# Sets Var=x.y.z
macro(get_version Var Path)
- string(REGEX MATCH "[0-9]+(\\.[0-9]+)*" ${Var} ${Path})
+ string(REGEX MATCH "[0-9]+(\\.[0-9]+)*$" ${Var} ${Path})
endmacro (get_version)
# Helper function to glob CUDA source files and set LANGUAGE property