Skip to content

Commit

Permalink
Merge pull request #22 from sgerbino/enhancement-cpack-deployments
Browse files Browse the repository at this point in the history
Fix for CMake version validation regex expression
  • Loading branch information
sgerbino committed Dec 23, 2015
2 parents 035d02f + 955c45c commit 70e4d98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ execute_process(
OUTPUT_VARIABLE TABLE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9].*" TABLE_VALID_VERSION TABLE_VERSION)
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" TABLE_VALID_VERSION "${TABLE_VERSION}")
if (TABLE_VALID_VERSION)
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" TABLE_MAJOR_VERSION "${TABLE_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" TABLE_MINOR_VERSION "${TABLE_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/versioning.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(GIT_FOUND)
OUTPUT_VARIABLE TABLE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9].*" TABLE_VALID_VERSION TABLE_VERSION)
string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" TABLE_VALID_VERSION "${TABLE_VERSION}")
if (TABLE_VALID_VERSION)
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" TABLE_MAJOR_VERSION "${TABLE_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" TABLE_MINOR_VERSION "${TABLE_VERSION}")
Expand Down

0 comments on commit 70e4d98

Please sign in to comment.