]> granicus.if.org Git - esp-idf/commitdiff
cmake: Project & IDF git revisions: Show un-annotated tags and -dirty flag
authorAngus Gratton <angus@espressif.com>
Wed, 22 May 2019 00:19:38 +0000 (10:19 +1000)
committerAngus Gratton <gus@projectgus.com>
Thu, 23 May 2019 03:46:23 +0000 (13:46 +1000)
Adds --tags and --dirty flags to cmake git_describe() calls, and not
pass the HEAD commit hash (incompatible with --dirty)

Makes IDF_VER output the same as in Make build system

Thanks to @william-ferguson-au for reporting this:
https://github.com/espressif/esp-idf/issues/3378#event-2355460974

tools/cmake/third_party/GetGitRevisionDescription.cmake

index 51468b39b3f0ec5a8150b20c336835c7f58299da..1de63b36231abe88a248af48477d36a24372b717 100644 (file)
@@ -113,7 +113,8 @@ function(git_describe _var _repo_dir)
                ${_repo_dir}
                describe
                "--always"
-               ${hash}
+               "--tags"
+               "--dirty"
                ${ARGN}
                WORKING_DIRECTORY
                "${CMAKE_CURRENT_SOURCE_DIR}"