Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

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.
Commit
8ce92d2c7288b6b3261caf1c016f8a779b6a8efc
Author
autoantwort ·
Committer
GitHub
Parents
a43f67962e63

Files · Download .tar.gz

Changes

 CMake/CatchMiscFunctions.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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()