git.cmake: let the environment override BUILD_VERSION
This is needed to remove noise when comparing binaries across git commits and more generally for anyone who wants to manual control/override the version number when building with or without a .git/ subdirectory. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
0f7255c3b8
commit
39131dc3ce
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
# https://cmake.org/cmake/help/latest/module/FindGit.html
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
if(NOT BUILD_VERSION AND GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe --abbrev=12
|
||||
WORKING_DIRECTORY ${ZEPHYR_BASE}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue