diff options
author | Igor Peschinskiy <igor.peschinskiy@gmail.com> | 2017-02-01 09:54:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-01 18:47:37 (GMT) |
commit | 88c4576be412c85c112976dcec51b3fb7905b618 (patch) | |
tree | 5457b84b5a0c75201dc946230bfc7e3192409b57 /Modules/FindGSL.cmake | |
parent | 1f8da86115b6333b803feb769341fbfa171fbcc9 (diff) | |
download | CMake-88c4576be412c85c112976dcec51b3fb7905b618.zip CMake-88c4576be412c85c112976dcec51b3fb7905b618.tar.gz CMake-88c4576be412c85c112976dcec51b3fb7905b618.tar.bz2 |
FindGSL: Fix gl_version.h extraction regex
Fix the regex to match versions with only two digits, such as `2.3`.
Diffstat (limited to 'Modules/FindGSL.cmake')
-rw-r--r-- | Modules/FindGSL.cmake | 2 |
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" |