Skip to content

Commit

Permalink
[cmake] Fix detection of master for ROOT_VERSION.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Dec 6, 2018
1 parent 860b4b8 commit 4f1c5da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ else()
string(REGEX REPLACE "^.*/v([0-9]+)-.*" "\\1" ROOT_MAJOR_VERSION ${GIT_DESCRIBE_ALL})
string(REGEX REPLACE "^.*/v[0-9]+-([0-9]+).*" "\\1" ROOT_MINOR_VERSION ${GIT_DESCRIBE_ALL})
set(ROOT_PATCH_VERSION "99") # aka head of ...-patches
elseif("${GIT_DESCRIBE_ALL}" MATCHES "heads/master")
elseif("${GIT_DESCRIBE_ALL}" MATCHES "/master$")
# GIT_DESCRIBE_ALWAYS: v6-13-04-2163-g7e8d27ea66
# GIT_DESCRIBE_ALL: heads/master
# GIT_DESCRIBE_ALL: heads/master or remotes/origin/master
file(READ ${CMAKE_SOURCE_DIR}/build/version_number versionstr)
string(STRIP ${versionstr} versionstr)
string(REGEX REPLACE "([0-9]+)[.][0-9]+[/][0-9]+" "\\1" ROOT_MAJOR_VERSION ${versionstr})
Expand Down

0 comments on commit 4f1c5da

Please sign in to comment.