diff options
author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2020-02-08 18:14:09 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-21 01:20:51 +0100 |
commit | fe489e2be1312bc559d0c38691c9741ad69cfec8 (patch) | |
tree | 5d163f9596bdad32453a9b41792fabbbe2ec8395 | |
parent | 172e5c3577f99331743f7d3c81de738811781552 (diff) |
Build: Enable and require c++17 (#23868)
* Build: Enable and require c++17
* Build: Raise Visual Studio version from 2017 15.2 to 2017 15.9
* Build: Raise GCC version from 6.3.0 to 7.1.0
* Reduce branch differences
* Fix build after latest merge
* Cleanup after latest merge
(cherry picked from commit 726d5e91b55d4742dcbd6b0a82d84788dbb117b7)
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 2 | ||||
-rw-r--r-- | cmake/macros/ConfigureBaseTargets.cmake | 1 | ||||
-rw-r--r-- | cmake/macros/FindPCHSupport.cmake | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index abf9fa5acf7..db69064ebce 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -3,7 +3,7 @@ target_compile_definitions(trinity-compile-option-interface INTERFACE -D_BUILD_DIRECTIVE="$<CONFIG>") -set(GCC_EXPECTED_VERSION 6.3.0) +set(GCC_EXPECTED_VERSION 7.1.0) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION) message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}") diff --git a/cmake/macros/ConfigureBaseTargets.cmake b/cmake/macros/ConfigureBaseTargets.cmake index a59459ee773..95adb992b1a 100644 --- a/cmake/macros/ConfigureBaseTargets.cmake +++ b/cmake/macros/ConfigureBaseTargets.cmake @@ -19,6 +19,7 @@ add_library(trinity-feature-interface INTERFACE) target_compile_features(trinity-feature-interface INTERFACE + cxx_std_17 cxx_alias_templates cxx_auto_type cxx_constexpr diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake index 3e553d09a35..11388d6fed9 100644 --- a/cmake/macros/FindPCHSupport.cmake +++ b/cmake/macros/FindPCHSupport.cmake @@ -21,7 +21,7 @@ if (CMAKE_VERSION VERSION_LESS "3.16.0") set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADER}) # Workaround for cotire bug: https://github.com/sakra/cotire/issues/138 - set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14) + set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 17) endforeach () cotire(${TARGET_NAME_LIST}) |