From 1be2d32fd502eeb68bd63fb07b0325b25ee357bd Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Mon, 4 May 2015 18:46:49 -0400 Subject: Make Git version detection use VERSION_STRING instead of tags This fixes the problem where 0.4.12-dev versions were erroneously shown as 0.4.11-dev because the tag was added on a separate branch. It also fixes a similar issue when builders didn't fetch new tags when updating. This also removes the number-of-commits-since-tag field, since it's incompatible with this. Said field doesn't seem to be useful anyway if you have the commit hash. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 639c07077..d1353e16c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,13 @@ set(VERSION_MINOR 4) set(VERSION_PATCH 12) set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string") +# Change to false for releases +set(DEVELOPMENT_BUILD TRUE) + set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") if(VERSION_EXTRA) set(VERSION_STRING ${VERSION_STRING}-${VERSION_EXTRA}) -else() - # Comment the following line during release +elseif(DEVELOPMENT_BUILD) set(VERSION_STRING "${VERSION_STRING}-dev") endif() -- cgit v1.2.3