浏览代码

cmake: Project & IDF git revisions: Show un-annotated tags and -dirty flag

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
Angus Gratton 6 年之前
父节点
当前提交
95dcfecedc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      tools/cmake/third_party/GetGitRevisionDescription.cmake

+ 2 - 1
tools/cmake/third_party/GetGitRevisionDescription.cmake

@@ -113,7 +113,8 @@ function(git_describe _var _repo_dir)
 		${_repo_dir}
 		describe
 		"--always"
-		${hash}
+		"--tags"
+		"--dirty"
 		${ARGN}
 		WORKING_DIRECTORY
 		"${CMAKE_CURRENT_SOURCE_DIR}"