summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-01-10 15:38:08 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-01-10 18:38:25 +0100
commitb71c2cc9938eee649d6b4a787d4c4bebe849d6e9 (patch)
tree86cc8cc15f8ee3411bb1164aa8f859bef6ffd206 /cmake
parentd501c9f496b3c8c5cfa870830108ce104174bf25 (diff)
downloadouroboros-b71c2cc9938eee649d6b4a787d4c4bebe849d6e9.tar.gz
ouroboros-b71c2cc9938eee649d6b4a787d4c4bebe849d6e9.zip
build: Add patchlevel to version
This adds a patchlevel to the Ouroboros version. Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/GitVersionGen.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/GitVersionGen.cmake b/cmake/GitVersionGen.cmake
index 916572ff..42753d7c 100644
--- a/cmake/GitVersionGen.cmake
+++ b/cmake/GitVersionGen.cmake
@@ -24,13 +24,17 @@ macro(git_version_gen)
message(STATUS "Repository tag is: ${_git_tag}")
string(REGEX REPLACE
- "[^0-9]*([0-9]+)\\.[0-9]+.*" "\\1"
+ "^([0-9]+)\\..*" "\\1"
_version_major "${_git_tag}")
string(REGEX REPLACE
- "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1"
+ "^[0-9]+\\.([0-9]+)\\..*" "\\1"
_version_minor "${_git_tag}")
+ string(REGEX REPLACE
+ "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1"
+ _version_patch "${_git_tag}")
set(PACKAGE_VERSION_MAJOR "${_version_major}")
set(PACKAGE_VERSION_MINOR "${_version_minor}")
+ set(PACKAGE_VERSION_PATCH "${_version_patch}")
endmacro(git_version_gen)