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.
This commit is contained in:
autoantwort 2022-10-24 18:26:40 +02:00 committed by GitHub
parent a43f67962e
commit 8ce92d2c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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