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>2024-02-26 12:17:31 +0100
commitf7a59ea7070f38591f90920e2f0a2c79dfc7f740 (patch)
treea62ef214dd9dfd5c4a955a65542a752fd4a8d946 /cmake
parent7ff70a6bff86d641c51da46285ff69ca3361cff3 (diff)
Build: Update required cmake version to 3.18
* Remove cotire (cherry picked from commit add53fb3ef410812b73a9143cb1a32d09b43002a)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/macros/FindPCHSupport.cmake53
1 files changed, 19 insertions, 34 deletions
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)