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
|
@ -255,7 +255,8 @@ zephyr_compile_options("SHELL: $<TARGET_PROPERTY:compiler,imacros> ${AUTOCONF_H}
|
|||
|
||||
if(NOT CONFIG_PICOLIBC)
|
||||
# @Intent: Set compiler specific flag for bare metal freestanding option
|
||||
zephyr_compile_options($<TARGET_PROPERTY:compiler,freestanding>)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,freestanding>>)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:$<TARGET_PROPERTY:compiler,freestanding>>)
|
||||
endif()
|
||||
|
||||
# @Intent: Set compiler specific flag for tentative definitions, no-common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue