From 9becb3221d7753a3801f4e985b711ac43ae9ea63 Mon Sep 17 00:00:00 2001 From: Evan Barentin <948284-evan-barentin@users.noreply.gitlab.com> Date: Mon, 2 Jun 2025 13:37:51 +0200 Subject: [PATCH] Fix: precise source directory to git log call --- profiler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 9d026b83..bd7ddc09 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -193,7 +193,7 @@ endif() find_package(Git) if(Git_FOUND) add_custom_target(git-ref - COMMAND ${GIT_EXECUTABLE} log -1 "--format=#pragma once %nnamespace tracy { static inline const char* GitRef = %x22%h%x22; }" ${GIT_REV} > GitRef.hpp.tmp + COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR} log -1 "--format=#pragma once %nnamespace tracy { static inline const char* GitRef = %x22%h%x22; }" ${GIT_REV} > GitRef.hpp.tmp COMMAND ${CMAKE_COMMAND} -E copy_if_different GitRef.hpp.tmp GitRef.hpp BYPRODUCTS GitRef.hpp GitRef.hpp.tmp VERBATIM