Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tophoo
CMake
Commits
88c4576b
Commit
88c4576b
authored
8 years ago
by
Igor Peschinskiy
Committed by
Brad King
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
FindGSL: Fix gl_version.h extraction regex
Fix the regex to match versions with only two digits, such as `2.3`.
parent
1f8da861
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/FindGSL.cmake
+1
-1
1 addition, 1 deletion
Modules/FindGSL.cmake
with
1 addition
and
1 deletion
Modules/FindGSL.cmake
+
1
−
1
View file @
88c4576b
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment