cmake: filter not supported C++ compilation flags
Compilation warnings appears for C++ files, that following options are not valid: -ffrestanding, -Wno-format-zero-length -Wno-main -fgnu89-inline -std-gnu99 Added checks to filter out unsupported flags. Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This commit is contained in:
parent
8e8cc7e490
commit
69913adc80
4 changed files with 13 additions and 12 deletions
|
@ -26,7 +26,7 @@ set_compiler_property(PROPERTY optimization_size -Os)
|
|||
#######################################################
|
||||
|
||||
# GCC Option standard warning base in Zephyr
|
||||
set_compiler_property(PROPERTY warning_base
|
||||
check_set_compiler_property(PROPERTY warning_base
|
||||
-Wall
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
|
@ -160,7 +160,7 @@ endif()
|
|||
check_set_compiler_property(APPEND PROPERTY hosted -fno-freestanding)
|
||||
|
||||
# gcc flag for a freestanding application
|
||||
set_compiler_property(PROPERTY freestanding -ffreestanding)
|
||||
check_set_compiler_property(PROPERTY freestanding -ffreestanding)
|
||||
|
||||
# Flag to enable debugging
|
||||
set_compiler_property(PROPERTY debug -g)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue