build: fix git describe call on older Git versions
Older Git versions still do not support the -C argument for specifying
the working directory. Switch to using cmake WORKING_DIRECTORY instead.
This fixes #7287 again after commit 5e7e1cb
.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This commit is contained in:
parent
5fa89ae164
commit
ff6dbc599c
|
@ -251,7 +251,8 @@ include(${ZEPHYR_BASE}/cmake/toolchain.cmake)
|
|||
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${ZEPHYR_BASE} describe
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe
|
||||
WORKING_DIRECTORY ${ZEPHYR_BASE}
|
||||
OUTPUT_VARIABLE BUILD_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue