cmake: fix xcc not supporting -Wno-unsed-but-set-variable

XCC does not support the compiler flag -Wno-unused-but-set-variable
so check for flag support before setting it in cmake.

Fixes #29707

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2020-11-09 10:29:20 -08:00 committed by Anas Nashif
commit 7d16ab50d7

View file

@ -89,7 +89,7 @@ check_set_compiler_property(APPEND PROPERTY warning_dw_3
-Wvla -Wvla
) )
set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable) check_set_compiler_property(PROPERTY warning_extended -Wno-unused-but-set-variable)
check_set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int) check_set_compiler_property(PROPERTY warning_error_implicit_int -Werror=implicit-int)