From: Daniel Elstner Date: Sat, 18 Jul 2015 20:47:11 +0000 (+0200) Subject: Build: Use -dirty version suffix for local changes X-Git-Tag: pulseview-0.3.0~163 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3d87310109576c77819c4c592d41bc1d9731978b;p=pulseview.git 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. --- 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