]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Disable unknown pragmas warnings
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 9 Feb 2024 13:47:33 +0000 (13:47 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 9 Feb 2024 13:47:33 +0000 (13:47 +0000)
cmake/CompilerWarnings.cmake

index 9092457de607477212596a91595f7deaa470cd18..285e61546458a9a96f656f4e3c3718ab294a43b1 100644 (file)
@@ -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