cmake: compiler: Add nostdincxx property for gcc

This commit adds the `nostdincxx` C++ compiler property for GCC, which
is specified when the C++ standard library (`CONFIG_LIB_CPLUSPLUS`) is
disabled.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2021-09-11 22:08:45 +09:00 committed by Anas Nashif
commit c2859bc7aa

View file

@ -120,6 +120,8 @@ if (NOT CONFIG_NEWLIB_LIBC AND
set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC}) set_compiler_property(APPEND PROPERTY nostdinc_include ${NOSTDINC})
endif() endif()
set_compiler_property(TARGET compiler-cpp PROPERTY nostdincxx "-nostdinc++")
# Required C++ flags when using gcc # Required C++ flags when using gcc
set_property(TARGET compiler-cpp PROPERTY required "-fcheck-new") set_property(TARGET compiler-cpp PROPERTY required "-fcheck-new")