diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-01-16 15:09:46 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-01-16 19:37:12 +0100 |
commit | 25d8df0b735c6b966b05cc3ce4a8f69cf20b199f (patch) | |
tree | 6145329ede7de56cf307f9f5c4d82c469b8878a8 /cmake | |
parent | e98f08c797a2159d6f6c328a2a3c680a44c743f0 (diff) | |
download | rspamd-25d8df0b735c6b966b05cc3ce4a8f69cf20b199f.tar.gz rspamd-25d8df0b735c6b966b05cc3ce4a8f69cf20b199f.zip |
[Minor] do not pass invalid C warnings to C++ flags
cc1plus: warning: command line option ‘-Wno-pointer-sign’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CompilerWarnings.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index b9bb7ffde..4dd011d98 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -35,10 +35,12 @@ IF(SUPPORT_WUNUSED_VAR) ADD_COMPILE_OPTIONS("-Wunused-variable") ENDIF(SUPPORT_WUNUSED_VAR) IF(SUPPORT_WPOINTER_SIGN) - ADD_COMPILE_OPTIONS("-Wno-pointer-sign") + # only valid for C + ADD_COMPILE_OPTIONS($<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>) ENDIF(SUPPORT_WPOINTER_SIGN) IF(SUPPORT_WSTRICT_PROTOTYPES) - ADD_COMPILE_OPTIONS("-Wstrict-prototypes") + # only valid for C + ADD_COMPILE_OPTIONS($<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>) ENDIF(SUPPORT_WSTRICT_PROTOTYPES) IF(SUPPORT_WSTRICT_ALIASING) ADD_COMPILE_OPTIONS("-Wno-strict-aliasing") |