diff options
author | Brad King <brad.king@kitware.com> | 2022-02-08 15:31:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-08 15:31:16 (GMT) |
commit | b91c4dfb758beecf796d6e455621c36602d2ec7d (patch) | |
tree | 9c3e9a13f54c2d8e8a09148bd6e4f5a4781214f9 | |
parent | d60647a52b8443ef31dbf12c291ab075866a77bf (diff) | |
parent | b67ff61c3a128925947cda45fd924727fac3b9b0 (diff) | |
download | CMake-b91c4dfb758beecf796d6e455621c36602d2ec7d.zip CMake-b91c4dfb758beecf796d6e455621c36602d2ec7d.tar.gz CMake-b91c4dfb758beecf796d6e455621c36602d2ec7d.tar.bz2 |
Merge branch 'FindGSL-version-regex' into release-3.22
Merge-request: !6960
-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" |