Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorautoantwort2022-10-24 18:26:40 +0200
committerGitHub2022-10-24 18:26:40 +0200
commit8ce92d2c7288b6b3261caf1c016f8a779b6a8efc (patch)
tree345d7eefde0302a729a4205b60d5d50eae2b966e
parenta43f67962e632d9596680a7e139df9e0a1423d3a (diff)
downloadcatch3-8ce92d2c7288b6b3261caf1c016f8a779b6a8efc.tar.gz
CatchMiscFunctions.cmake: Use PRIVATE for target_compile_options (#2553)
With the changes to how `-ffile-prefix-map` is detected, Catch2 started propagating the flag to its dependents, which isn't the desired behaviour, the normalization should only apply to Catch2's impl.
-rw-r--r--CMake/CatchMiscFunctions.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/CatchMiscFunctions.cmake b/CMake/CatchMiscFunctions.cmake
index be76d838..5a068d08 100644
--- a/CMake/CatchMiscFunctions.cmake
+++ b/CMake/CatchMiscFunctions.cmake
@@ -13,7 +13,7 @@ function(add_cxx_flag_if_supported_to_targets flagname targets)
if (HAVE_FLAG_${flag_identifier})
foreach(target ${targets})
- target_compile_options(${target} PUBLIC ${flagname})
+ target_compile_options(${target} PRIVATE ${flagname})
endforeach()
endif()
endfunction()