diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CompilerWarnings.cmake | 6 |
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") |