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

@@ -95,6 +95,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_COMPRESS_DEBUG=ON \
-DOPTION_LTO=ON \
-DOPTION_TRIM_PATH_PREFIX=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
# EOF
echo "::endgroup::"

View File

@@ -138,6 +138,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_COMPRESS_DEBUG=ON \
-DOPTION_LTO=ON \
-DOPTION_TRIM_PATH_PREFIX=ON \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
-DOPTION_PACKAGE_DEPENDENCIES=ON \
# EOF

View File

@@ -112,6 +112,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_TRIM_PATH_PREFIX=ON \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
# EOF
echo "::endgroup::"
@@ -133,6 +134,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_TRIM_PATH_PREFIX=ON \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
-DCPACK_BUNDLE_APPLE_CERT_APP=${{ secrets.APPLE_DEVELOPER_CERTIFICATE_ID }} \
"-DCPACK_BUNDLE_APPLE_CODESIGN_PARAMETER=--deep -f --options runtime" \

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)