cmake: c++ compiler flag exclusion, -Werror=implicit-int
Fixes: #28097 The compiler warning flag `-Werror=implicit-int` was added using `set_compiler_property()` which will always add the compiler flag if the compiler flag supports it. This has been changed to `check_set_compiler_property()` which will check if the flag is among the list of `CXX_EXCLUDED_OPTIONS`, and only adds the flag if both the compiler supports it, and it is not an excluded option. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
2e87e33dd1
commit
27e1fd69f9
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ check_set_compiler_property(PROPERTY warning_extended
|
||||||
-Wno-tautological-compare
|
-Wno-tautological-compare
|
||||||
)
|
)
|
||||||
|
|
||||||
set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)
|
check_set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)
|
||||||
|
|
||||||
set_compiler_property(PROPERTY warning_error_misra_sane -Werror=vla)
|
set_compiler_property(PROPERTY warning_error_misra_sane -Werror=vla)
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ check_set_compiler_property(APPEND PROPERTY warning_dw_3
|
||||||
|
|
||||||
set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable)
|
set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable)
|
||||||
|
|
||||||
set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)
|
check_set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)
|
||||||
|
|
||||||
set_compiler_property(PROPERTY warning_error_misra_sane -Werror=vla)
|
set_compiler_property(PROPERTY warning_error_misra_sane -Werror=vla)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue