CMake: Change -ffile-prefix-map to be enabled by an option

Use in github release workflows
This commit is contained in:
Jonathan G Rennison
2023-08-17 13:59:48 +01:00
parent 8dc953c590
commit 6fa3620222
4 changed files with 9 additions and 1 deletions

View File

@@ -93,9 +93,13 @@ macro(compile_flags)
# compiler all happy.
-fno-strict-aliasing
"-ffile-prefix-map=${CMAKE_SOURCE_DIR}/=/"
)
if(OPTION_TRIM_PATH_PREFIX)
add_compile_options("-ffile-prefix-map=${CMAKE_SOURCE_DIR}/=/")
endif(OPTION_TRIM_PATH_PREFIX)
if(NOT CMAKE_BUILD_TYPE)
# Sensible default if no build type specified
add_compile_options(-O2)