diff options
author | Brad King <brad.king@kitware.com> | 2021-12-20 14:21:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-12-20 14:22:27 (GMT) |
commit | 6db5fdae4db24a3c421769f24f977a4d10f40212 (patch) | |
tree | c3484d4bca41575f88b6bf0da4cc83c96027cb19 /Modules | |
parent | f5f73e5ac1820567c3741b89896ed6bf2b94fbdb (diff) | |
parent | 58f2708b90473e9a2c361b03f48e69bbc195c745 (diff) | |
download | CMake-6db5fdae4db24a3c421769f24f977a4d10f40212.zip CMake-6db5fdae4db24a3c421769f24f977a4d10f40212.tar.gz CMake-6db5fdae4db24a3c421769f24f977a4d10f40212.tar.bz2 |
Merge topic 'FindGSL-version-regex'
58f2708b90 FindGSL: Improve version extraction regex
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6812
Diffstat (limited to 'Modules')
-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 3d4e7f9..485735a 100644 --- a/Modules/FindGSL.cmake +++ b/Modules/FindGSL.cmake @@ -139,7 +139,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 ".*define[ ]+GSL_VERSION[ ]+\"([^\"]*)\".*" "\\1" GSL_VERSION ${gsl_version_h_contents} ) endif() # might also try scraping the directory name for a regex match "gsl-X.X" |