- Make the 'C++ Standard' choice depend on CPLUSPLUS, so that it only shows up when C++ support is enabled. Also check that CPLUSPLUS is enabled before checking the standard in the top-level CMakeLists.txt, to avoid triggering an assert. - The 'C++ Options' menu now contains just CPLUSPLUS and its indented children. Remove one menu level by removing the menu and turning CPLUSPLUS into a 'menuconfig' symbol. Also change the prompt from "Enable C++ support for the application" to just "C++ support for the application", to make it consistent with e.g. "Logging". - Factor out the common CPLUSPLUS dependency with an 'if CPLUSPLUS'. - Order symbol properties more consistently with other Kconfig files, with the prompt at the top, etc. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
68 lines
1.2 KiB
Text
68 lines
1.2 KiB
Text
# Kconfig - C++ configuration options
|
|
|
|
#
|
|
# Copyright (c) 2018 B. Leforestier
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menuconfig CPLUSPLUS
|
|
bool "C++ support for the application"
|
|
help
|
|
This option enables the use of applications built with C++.
|
|
|
|
if CPLUSPLUS
|
|
|
|
choice
|
|
prompt "C++ Standard"
|
|
default STD_CPP11
|
|
help
|
|
C++ Standards.
|
|
|
|
config STD_CPP98
|
|
bool "C++ 98"
|
|
help
|
|
1998 C++ standard as modified by the 2003 technical corrigendum
|
|
and some later defect reports.
|
|
|
|
config STD_CPP11
|
|
bool "C++ 11"
|
|
help
|
|
2011 C++ standard, previously known as C++0x.
|
|
|
|
config STD_CPP14
|
|
bool "C++ 14"
|
|
help
|
|
2014 C++ standard.
|
|
|
|
config STD_CPP17
|
|
bool "C++ 17"
|
|
help
|
|
2017 C++ standard, previously known as C++0x.
|
|
|
|
config STD_CPP2A
|
|
bool "C++ 2a"
|
|
help
|
|
Next revision of the C++ standard, which is expected to be published in 2020.
|
|
|
|
endchoice
|
|
|
|
config LIB_CPLUSPLUS
|
|
bool "Link with STD C++ library"
|
|
help
|
|
Link with STD C++ Library.
|
|
|
|
config EXCEPTIONS
|
|
bool "Enable C++ exceptions support"
|
|
select LIB_CPLUSPLUS
|
|
depends on NEWLIB_LIBC
|
|
help
|
|
This option enables support of C++ exceptions.
|
|
|
|
config RTTI
|
|
bool "Enable C++ RTTI support"
|
|
select LIB_CPLUSPLUS
|
|
help
|
|
This option enables support of C++ RTTI.
|
|
|
|
endif # CPLUSPLUS
|