From 284e96bd36840df4dfe174ae7dfbf3964bd61892 Mon Sep 17 00:00:00 2001 From: Elias Bermudez <6505145+debermudez@users.noreply.github.com> Date: Fri, 8 Dec 2023 08:57:02 -0800 Subject: [PATCH] fix pa sha (#445) * Add check for pa sha passed in via yaml + docker * Update cmake execute command to change working dir * Remove changes to top level Cmakelists files --- src/c++/perf_analyzer/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/c++/perf_analyzer/CMakeLists.txt b/src/c++/perf_analyzer/CMakeLists.txt index a6ae75cda..bebdba4d5 100644 --- a/src/c++/perf_analyzer/CMakeLists.txt +++ b/src/c++/perf_analyzer/CMakeLists.txt @@ -35,11 +35,10 @@ add_subdirectory(client_backend) find_package(Git REQUIRED) -execute_process(COMMAND - "${GIT_EXECUTABLE}" log -n 1 --abbrev-commit --format=format:%h +execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND "${GIT_EXECUTABLE}" log -n 1 --abbrev-commit --format=format:%h RESULT_VARIABLE RETURN_CODE OUTPUT_VARIABLE GIT_SHA) - if(NOT RETURN_CODE EQUAL "0") set(GIT_SHA "unknown") endif()