feat(Core): Enable C++20 support
This commit is contained in:
3
conf/dist/config.cmake
vendored
3
conf/dist/config.cmake
vendored
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 !")
|
||||
|
||||
Reference in New Issue
Block a user