From d181e80c295ef344f6cfcfb877957af78760b11f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 14 Jun 2025 11:56:17 +0200 Subject: [PATCH] Fix builds out of git repository. --- profiler/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index bd7ddc09..8f91fafb 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} -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 ${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 || echo "#pragma once\nnamespace tracy { static inline const char* GitRef = \"unknown\"; }" > GitRef.hpp.tmp COMMAND ${CMAKE_COMMAND} -E copy_if_different GitRef.hpp.tmp GitRef.hpp BYPRODUCTS GitRef.hpp GitRef.hpp.tmp VERBATIM