[PATCH] omit build path
authorA. Maitland Bottoms <bottoms@debian.org>
Mon, 5 Sep 2022 01:20:13 +0000 (21:20 -0400)
committerA. Maitland Bottoms <bottoms@debian.org>
Sun, 16 Jul 2023 01:58:53 +0000 (02:58 +0100)
Have CMake filter out build path from COMPILER_INFO
before using the string in constants.c

Signed-off-by: A. Maitland Bottoms <bottoms@debian.org>
Gbp-Pq: Name omit-build-paths

lib/CMakeLists.txt

index 3cfffe534d9fa655f7c72924984a3c6c4c47778e..09416e9f0bc418fadb01966912ef0f4a03b7bdca 100644 (file)
@@ -454,6 +454,7 @@ message(STATUS "Loading version ${VERSION} into constants...")
 
 #double escape for windows backslash path separators
 string(REPLACE "\\" "\\\\" prefix "${prefix}")
+string(REPLACE "${CMAKE_SOURCE_DIR}" "$BUILD_DIR" COMPILER_INFO "${COMPILER_INFO}")
 
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/constants.c.in