]> sigrok.org Git - pulseview.git/commitdiff
Build: Use -dirty version suffix for local changes
authorDaniel Elstner <redacted>
Sat, 18 Jul 2015 20:47:11 +0000 (22:47 +0200)
committerUwe Hermann <redacted>
Sat, 25 Jul 2015 17:11:40 +0000 (19:11 +0200)
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
CMakeLists.txt

index c8d27f2e8ce494c96404086ce58982239916a44c..611b2969b33c87e98aff97eb759cf84bb9bb8dc9 100644 (file)
@@ -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}"
index e1bc3a60f856b63ad08eb80f57089d3bb69b6884..4a8eb5db9ca44e0ef26b1b71b1c0fb273eab6e4d 100644 (file)
@@ -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