From 05aea1ce58302c31f35b5b58d2f0a46f1bf09df2 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 9 Dec 2022 06:02:24 +0900 Subject: [PATCH] lib: cpp: Rename CONFIG_CPLUSPLUS to CONFIG_CPP There is no reason for the top-level C++ Kconfig symbol to be called `CPLUSPLUS` when the convention used throughout the Zephyr codebase is to use "cpp" to refer to C++ and the rest of the C++-related Kconfig symbols are prefixed with `CPP_`. This commit renames the Kconfig `CPLUSPLUS` symbol to `CPP` in order to better align with the de-facto standard naming convention used throughout the Zephyr codebase, and deprecates the old `CPLUSPLUS` symbol. Signed-off-by: Stephanos Ioannidis --- lib/cpp/Kconfig | 12 +++++++++--- lib/cpp/Kconfig.deprecated | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 lib/cpp/Kconfig.deprecated diff --git a/lib/cpp/Kconfig b/lib/cpp/Kconfig index af36e357505..4ab035c6f8c 100644 --- a/lib/cpp/Kconfig +++ b/lib/cpp/Kconfig @@ -3,12 +3,14 @@ # Copyright (c) 2018 B. Leforestier # SPDX-License-Identifier: Apache-2.0 -menuconfig CPLUSPLUS +menu "C++ Language Support" + +config CPP bool "C++ support for the application" help This option enables the use of applications built with C++. -if CPLUSPLUS +if CPP choice prompt "C++ Standard" @@ -94,4 +96,8 @@ config CPP_STATIC_INIT_GNU help GNU-compatible initialization of CPP static objects -endif # CPLUSPLUS +endif # CPP + +rsource "Kconfig.deprecated" + +endmenu diff --git a/lib/cpp/Kconfig.deprecated b/lib/cpp/Kconfig.deprecated new file mode 100644 index 00000000000..65f56e73b95 --- /dev/null +++ b/lib/cpp/Kconfig.deprecated @@ -0,0 +1,15 @@ +# Copyright (c) 2022 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +menu "Deprecated" + +config CPLUSPLUS + bool "[DEPRECATED] C++ support for the application" + select CPP + select DEPRECATED + help + This option enables the use of applications built with C++. + + [DEPRECATED] Select CPP instead. + +endmenu