From d25238fead4b5c07fe05bc2a29df759075a93bdc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 17 Dec 2024 14:41:26 +0000 Subject: [PATCH] [Minor] Limit some flags to C only --- cmake/CompilerWarnings.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index 71efe54352..5288c74eea 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("$<$:-Werror=implicit-int>") +ADD_COMPILE_OPTIONS("$<$:-Werror=implicit-function-declaration>") +ADD_COMPILE_OPTIONS("$<$:-Werror=strict-prototypes>") #IF(SUPPORT_WDEPRECATED_DECLARATIONS) # ADD_COMPILE_OPTIONS("-Wno-deprecated-declarations") -- 2.47.3