From: Vsevolod Stakhov Date: Fri, 9 Feb 2024 13:47:33 +0000 (+0000) Subject: [Minor] Disable unknown pragmas warnings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a12ccefd119fbe52fb6a06a67ae2fc7abf9ecbea;p=thirdparty%2Frspamd.git [Minor] Disable unknown pragmas warnings --- diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index 9092457de6..285e615464 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