From 8d506f0d6859b5a07d29cdb9036c928b23abd616 Mon Sep 17 00:00:00 2001 From: Matt Klein Date: Thu, 11 Aug 2016 11:09:23 -0700 Subject: [PATCH] read --build-id from root cmake project during linking --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de505de719b6..b951d4fb7b97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ include(common.cmake) include(thirdparty.cmake) # Setup build ID via the linker. Also, statically link GCC libraries to lock GCC version. -execute_process(COMMAND git rev-parse --sq HEAD OUTPUT_VARIABLE GIT_COMMIT WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +execute_process(COMMAND git -C ${CMAKE_SOURCE_DIR} rev-parse --sq HEAD OUTPUT_VARIABLE GIT_COMMIT WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) set(CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id=0x${GIT_COMMIT} -static-libstdc++ -static-libgcc ${ENVOY_EXE_EXTRA_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") include_directories(${PROJECT_SOURCE_DIR}/include)