From 7d16ab50d73803b74cd185d9ef1a64c1e8cf4519 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 9 Nov 2020 10:29:20 -0800 Subject: [PATCH] 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 --- cmake/compiler/gcc/compiler_flags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/compiler/gcc/compiler_flags.cmake b/cmake/compiler/gcc/compiler_flags.cmake index a8133f509c1..11377ab54c7 100644 --- a/cmake/compiler/gcc/compiler_flags.cmake +++ b/cmake/compiler/gcc/compiler_flags.cmake @@ -89,7 +89,7 @@ check_set_compiler_property(APPEND PROPERTY warning_dw_3 -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)