From 3bbf458bd235d6395a80158ee3ed7cfcf122991c Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 30 Jan 2022 00:50:22 +0100 Subject: [PATCH] feat(Core): Enable C++20 support --- conf/dist/config.cmake | 3 --- src/cmake/macros/ConfigureBaseTargets.cmake | 12 +++--------- src/cmake/showoptions.cmake | 6 ------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/conf/dist/config.cmake b/conf/dist/config.cmake index 329f2656eb..43bc3dd5ee 100644 --- a/conf/dist/config.cmake +++ b/conf/dist/config.cmake @@ -87,8 +87,5 @@ endif() set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.") set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical) -# If disable - use c++17 -option(USE_CPP_20 "Enable c++20 standard" 0) - # Config abort option(CONFIG_ABORT_INCORRECT_OPTIONS "Enable abort if core found incorrect option in config files" 0) diff --git a/src/cmake/macros/ConfigureBaseTargets.cmake b/src/cmake/macros/ConfigureBaseTargets.cmake index 046b8728f1..830a634ba6 100644 --- a/src/cmake/macros/ConfigureBaseTargets.cmake +++ b/src/cmake/macros/ConfigureBaseTargets.cmake @@ -16,15 +16,9 @@ add_library(acore-compile-option-interface INTERFACE) # Use -std=c++11 instead of -std=gnu++11 set(CXX_EXTENSIONS OFF) -if (USE_CPP_20) - # Enable support С++20 - set(CMAKE_CXX_STANDARD 20) - message(STATUS "Enabled С++20 standard") -else() - # Enable support С++17 - set(CMAKE_CXX_STANDARD 17) - message(STATUS "Enabled С++17 standard") -endif() +# Enable C++20 support +set(CMAKE_CXX_STANDARD 20) +message(STATUS "Enabled С++20 standard") # An interface library to make the warnings level available to other targets # This interface taget is set-up through the platform specific script diff --git a/src/cmake/showoptions.cmake b/src/cmake/showoptions.cmake index 906692e106..1d2366a281 100644 --- a/src/cmake/showoptions.cmake +++ b/src/cmake/showoptions.cmake @@ -182,12 +182,6 @@ if(BUILD_SHARED_LIBS) WarnAboutSpacesInBuildPath() endif() -if (USE_CPP_20) - message("") - message(" *** Enabled C++20 standart") - message(" *** Please note that this is an experimental feature!") -endif() - if (CONFIG_ABORT_INCORRECT_OPTIONS) message("") message(" WARNING !")