cpp: Restore C++2A Kconfig

Restore the legacy C++2a Kconfig for compilers that
do not support C++20.

Signed-off-by: Alexander Wachter <alexander.wachter@leica-geosystems.com>
This commit is contained in:
Alexander Wachter 2021-07-14 10:50:21 +02:00 committed by Christopher Friedt
parent b61ea62b6f
commit ad130f2661
5 changed files with 16 additions and 1 deletions

View file

@ -167,6 +167,8 @@ if(CONFIG_CPLUSPLUS)
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp14>)
elseif(CONFIG_STD_CPP17)
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp17>)
elseif(CONFIG_STD_CPP2A)
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp2a>)
elseif(CONFIG_STD_CPP20)
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp20>)
elseif(CONFIG_STD_CPP2B)

View file

@ -126,10 +126,12 @@ endif()
set_property(TARGET compiler-cpp PROPERTY dialect_cpp98 "-std=c++98")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp11 "-std=c++11")
#no support of C++14, C++17, C++2a
#no support of C++14, C++17, C++2a, C++20, C++2b
set_property(TARGET compiler-cpp PROPERTY dialect_cpp14 "")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp17 "")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a "")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "")
# Disable exeptions flag in C++
set_property(TARGET compiler-cpp PROPERTY no_exceptions "-fno-exceptions")

View file

@ -59,6 +59,8 @@ set_property(TARGET compiler-cpp PROPERTY dialect_cpp11)
set_property(TARGET compiler-cpp PROPERTY dialect_cpp14)
set_property(TARGET compiler-cpp PROPERTY dialect_cpp17)
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a)
set_property(TARGET compiler-cpp PROPERTY dialect_cpp20)
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b)
# Flag for disabling exeptions in C++
set_property(TARGET compiler-cpp PROPERTY no_exceptions)

View file

@ -130,6 +130,10 @@ set_property(TARGET compiler-cpp PROPERTY dialect_cpp14 "-std=c++14" "-Wno-regis
set_property(TARGET compiler-cpp PROPERTY dialect_cpp17 "-std=c++17" "-Wno-register")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a "-std=c++2a"
"-Wno-register" "-Wno-volatile")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "-std=c++20"
"-Wno-register" "-Wno-volatile")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "-std=c++2b"
"-Wno-register" "-Wno-volatile")
# Disable exeptions flag in C++
set_property(TARGET compiler-cpp PROPERTY no_exceptions "-fno-exceptions")

View file

@ -37,6 +37,11 @@ config STD_CPP17
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.
config STD_CPP20
bool "C++ 20"
help