From dd51b03d876cd6e8c94a134c5dd5abc0a97253bb Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Fri, 12 Sep 2014 00:40:25 +0200 Subject: [PATCH] always check git diff --- CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e93c278da..237181253 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,13 +160,8 @@ elseif(NOT MSVC) set(Boost_LIBRARIES "${Boost_LIBRARIES};rt;pthread") endif() -set(COMMIT_ID_IN_VERSION ON CACHE BOOL "Include commit ID in version") file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/version") -if (NOT COMMIT_ID_IN_VERSION) - set(VERSION "${VERSION}-unknown") - configure_file("src/version.h.in" "version/version.h") - add_custom_target(version ALL) -elseif(DEFINED COMMIT) +if(DEFINED COMMIT) string(REPLACE "." "\\." VERSION_RE "${VERSION}") if(NOT REFS MATCHES "(\\(|, )tag: v${VERSION_RE}(\\)|, )") set(VERSION "${VERSION}-g${COMMIT}")