summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-02 13:39:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-02-02 13:39:32 (GMT)
commitaba66d27a1d4b5364274784fce27a3c52ee2140b (patch)
tree86c1aaa4163bf6d365d40f9ddc2f32911e654aa5 /Modules
parent134ffe97949125c47292797da6080e1e965ff9a8 (diff)
parent88c4576be412c85c112976dcec51b3fb7905b618 (diff)
downloadCMake-aba66d27a1d4b5364274784fce27a3c52ee2140b.zip
CMake-aba66d27a1d4b5364274784fce27a3c52ee2140b.tar.gz
CMake-aba66d27a1d4b5364274784fce27a3c52ee2140b.tar.bz2
Merge topic 'FindGSL-regex-fixup'
88c4576b FindGSL: Fix gl_version.h extraction regex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGSL.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindGSL.cmake b/Modules/FindGSL.cmake
index 446c3a8..76059b3 100644
--- a/Modules/FindGSL.cmake
+++ b/Modules/FindGSL.cmake
@@ -135,7 +135,7 @@ if( NOT GSL_VERSION )
# 2. If gsl-config is not available, try looking in gsl/gsl_version.h
if( NOT GSL_VERSION AND EXISTS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" )
file( STRINGS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" gsl_version_h_contents REGEX "define GSL_VERSION" )
- string( REGEX REPLACE ".*([0-9].[0-9][0-9]).*" "\\1" GSL_VERSION ${gsl_version_h_contents} )
+ string( REGEX REPLACE ".*([0-9]\\.[0-9][0-9]?).*" "\\1" GSL_VERSION ${gsl_version_h_contents} )
endif()
# might also try scraping the directory name for a regex match "gsl-X.X"