From 3d87310109576c77819c4c592d41bc1d9731978b Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Sat, 18 Jul 2015 22:47:11 +0200 Subject: [PATCH] Build: Use -dirty version suffix for local changes Pass --dirty to git describe. This needed a slight hack to GetGitRevisionDescription.cmake to make it work. Also pass --tags to make git include lightweight tags in its search. --- CMake/GetGitRevisionDescription.cmake | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMake/GetGitRevisionDescription.cmake b/CMake/GetGitRevisionDescription.cmake index c8d27f2e..611b2969 100644 --- a/CMake/GetGitRevisionDescription.cmake +++ b/CMake/GetGitRevisionDescription.cmake @@ -107,7 +107,7 @@ function(git_describe _var) execute_process(COMMAND "${GIT_EXECUTABLE}" describe - ${hash} +# ${hash} commented to make --dirty work ${ARGN} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" diff --git a/CMakeLists.txt b/CMakeLists.txt index e1bc3a60..4a8eb5db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ set(PV_TITLE PulseView) set(PV_DESCRIPTION "A GUI for sigrok") include(GetGitRevisionDescription) -git_describe(PV_NAME_VERSION_STRING) +git_describe(PV_NAME_VERSION_STRING --tags --dirty) if(NOT PV_NAME_VERSION_STRING) # Read the version from a file that is distributed with -- 2.30.2