aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/CompilerWarnings.cmake
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-12-17 14:41:26 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-12-17 14:41:26 +0000
commitd25238fead4b5c07fe05bc2a29df759075a93bdc (patch)
treede9f643820abfa1bb41fe11d7d6b7dc06096bec8 /cmake/CompilerWarnings.cmake
parent9625fbb487db64b257c36b2ba15b0c5adcd820bb (diff)
downloadrspamd-d25238fead4b5c07fe05bc2a29df759075a93bdc.tar.gz
rspamd-d25238fead4b5c07fe05bc2a29df759075a93bdc.zip
[Minor] Limit some flags to C only
Diffstat (limited to 'cmake/CompilerWarnings.cmake')
-rw-r--r--cmake/CompilerWarnings.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake
index 71efe5435..5288c74ee 100644
--- a/cmake/CompilerWarnings.cmake
+++ b/cmake/CompilerWarnings.cmake
@@ -85,10 +85,10 @@ IF(SUPPORT_WSUGGEST_ATTRIBUTE)
ENDIF()
# Make some warnings more severe
-ADD_COMPILE_OPTIONS("-Werror=implicit-function-declaration")
-ADD_COMPILE_OPTIONS("-Werror=implicit-int")
ADD_COMPILE_OPTIONS("-Werror=return-type")
-ADD_COMPILE_OPTIONS("-Werror=strict-prototypes")
+ADD_COMPILE_OPTIONS("$<$<COMPILE_LANGUAGE:C>:-Werror=implicit-int>")
+ADD_COMPILE_OPTIONS("$<$<COMPILE_LANGUAGE:C>:-Werror=implicit-function-declaration>")
+ADD_COMPILE_OPTIONS("$<$<COMPILE_LANGUAGE:C>:-Werror=strict-prototypes>")
#IF(SUPPORT_WDEPRECATED_DECLARATIONS)
# ADD_COMPILE_OPTIONS("-Wno-deprecated-declarations")