aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-09-06 19:27:50 +0200
committerShauren <shauren.trinity@gmail.com>2022-09-06 19:27:50 +0200
commitadd53fb3ef410812b73a9143cb1a32d09b43002a (patch)
tree75e38f3aa4f724752ac7752919a6582524c0c4a6 /cmake
parent89652bd78f3e6333e0f7b8ff5fe65ee144a173a8 (diff)
Build: Update required cmake version to 3.18
* Remove cotire
Diffstat (limited to 'cmake')
-rw-r--r--cmake/macros/FindOpenSSL.cmake1
-rw-r--r--cmake/macros/FindPCHSupport.cmake53
2 files changed, 19 insertions, 35 deletions
diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake
index c83f9cafac5..91caf49a334 100644
--- a/cmake/macros/FindOpenSSL.cmake
+++ b/cmake/macros/FindOpenSSL.cmake
@@ -597,7 +597,6 @@ find_package_handle_standard_args(OpenSSL
OPENSSL_INCLUDE_DIR
VERSION_VAR
OPENSSL_VERSION
- HANDLE_VERSION_RANGE
HANDLE_COMPONENTS
FAIL_MESSAGE
"Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR"
diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake
index 0179a62240c..46520e4a2d6 100644
--- a/cmake/macros/FindPCHSupport.cmake
+++ b/cmake/macros/FindPCHSupport.cmake
@@ -1,35 +1,20 @@
-if(CMAKE_VERSION VERSION_LESS "3.16.0")
- if(MSVC)
- # Specify the maximum PreCompiled Header memory allocation limit
- # Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012,
- # hence we need to set an upper limit with /Zm to avoid discrepancies)
- # (And yes, this is a verified, unresolved bug with MSVC... *sigh*)
- #
- # Note: This workaround was verified to be required on MSVC 2017 as well
- set(COTIRE_PCH_MEMORY_SCALING_FACTOR 500)
- endif()
+# This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
- include(cotire)
-
- function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
- # Use the header for every target
- foreach(TARGET_NAME ${TARGET_NAME_LIST})
- # Disable unity builds
- set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD OFF)
-
- # Set the prefix header
- 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 17)
- endforeach()
-
- cotire(${TARGET_NAME_LIST})
- endfunction(ADD_CXX_PCH)
-else()
- function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
- foreach(TARGET_NAME ${TARGET_NAME_LIST})
- target_precompile_headers(${TARGET_NAME} PRIVATE ${PCH_HEADER})
- endforeach()
- endfunction(ADD_CXX_PCH)
-endif()
+function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
+ foreach(TARGET_NAME ${TARGET_NAME_LIST})
+ target_precompile_headers(${TARGET_NAME} PRIVATE ${PCH_HEADER})
+ endforeach()
+endfunction(ADD_CXX_PCH)