From a12ccefd119fbe52fb6a06a67ae2fc7abf9ecbea Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 9 Feb 2024 13:47:33 +0000 Subject: [PATCH] [Minor] Disable unknown pragmas warnings --- cmake/CompilerWarnings.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index 9092457de..285e61546 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -23,6 +23,9 @@ CHECK_C_COMPILER_FLAG(-Wdeprecated-declarations SUPPORT_WDEPRECATED_DECLARATIONS # Disable -Wsuggest-attribute=format: it is too noisy with FPs around fmt C++ library CHECK_C_COMPILER_FLAG(-Wsuggest-attribute SUPPORT_WSUGGEST_ATTRIBUTE) +# Disable -Wunknown-pragmas: we have both clang and gcc pragmas +CHECK_C_COMPILER_FLAG(-Wunknown-pragmas SUPPORT_WUNKNOWN_PRAGMAS) + IF(SUPPORT_WEXTRA) ADD_COMPILE_OPTIONS("-Wextra") ENDIF(SUPPORT_WEXTRA) @@ -87,3 +90,7 @@ ENDIF() IF(SUPPORT_WDEPRECATED_DECLARATIONS) ADD_COMPILE_OPTIONS("-Wno-deprecated-declarations") ENDIF() + +IF(SUPPORT_WUNKNOWN_PRAGMAS) + ADD_COMPILE_OPTIONS("-Wno-unknown-pragmas") +ENDIF() \ No newline at end of file -- 2.39.5