From 5e7e1cba69020aacaf1ab3c3167f2b7c4a52fce6 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 19 Jun 2018 16:01:28 -0400 Subject: [PATCH] cmake: fix git describe command line The "git describe" call for setting the boot banner is broken. The --work-tree option sets the checked out work tree, not the directory containing .git, which is where git describe needs to look for information on tags. Use -C instead so it's as if Git were run from the zephyr base directory instead. Signed-off-by: Marti Bolivar --- cmake/app/boilerplate.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/app/boilerplate.cmake b/cmake/app/boilerplate.cmake index 8b3962979f..3d32ba4e94 100644 --- a/cmake/app/boilerplate.cmake +++ b/cmake/app/boilerplate.cmake @@ -251,8 +251,7 @@ include(${ZEPHYR_BASE}/cmake/toolchain.cmake) find_package(Git QUIET) if(GIT_FOUND) - execute_process(COMMAND ${GIT_EXECUTABLE} --work-tree=${ZEPHYR_BASE} describe - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + execute_process(COMMAND ${GIT_EXECUTABLE} -C ${ZEPHYR_BASE} describe OUTPUT_VARIABLE BUILD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) endif()