Skip to content

Commit 39131dc

Browse files
marc-hbnashif
authored andcommitted
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 <[email protected]>
1 parent 0f7255c commit 39131dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/git.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# https://cmake.org/cmake/help/latest/module/FindGit.html
66
find_package(Git QUIET)
7-
if(GIT_FOUND)
7+
if(NOT BUILD_VERSION AND GIT_FOUND)
88
execute_process(
99
COMMAND ${GIT_EXECUTABLE} describe --abbrev=12
1010
WORKING_DIRECTORY ${ZEPHYR_BASE}

0 commit comments

Comments
 (0)