From c4a87fd5cc82f15c825ec281de43b8c93744d7b8 Mon Sep 17 00:00:00 2001 From: Valery Mironov Date: Wed, 7 May 2025 11:42:57 +0300 Subject: [PATCH] Warnings from system libraries should be private for them Otherwise these define will be produced to user targets --- runtimes/cmake/Modules/WarningFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/cmake/Modules/WarningFlags.cmake b/runtimes/cmake/Modules/WarningFlags.cmake index 43ef76561cc54..c253b9b117bc4 100644 --- a/runtimes/cmake/Modules/WarningFlags.cmake +++ b/runtimes/cmake/Modules/WarningFlags.cmake @@ -2,7 +2,7 @@ include(HandleFlags) # Warning flags =============================================================== function(cxx_add_warning_flags target enable_werror enable_pedantic) - target_compile_definitions(${target} PUBLIC -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) + target_compile_definitions(${target} PRIVATE -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) if (MSVC) # -W4 is the cl.exe/clang-cl equivalent of -Wall. (In cl.exe and clang-cl, # -Wall is equivalent to -Weverything in GCC style compiler drivers.)