diff options
author | Naios <naios-dev@live.de> | 2017-12-23 02:12:45 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2017-12-23 02:17:19 +0100 |
commit | 18ab645781074cb029f633ca67bbb366e1544af6 (patch) | |
tree | 6ebe57ae56febba2d203d31be498baedeeda8b42 /cmake/macros | |
parent | 5296c0063e458e2e3371bed1ebcbec64857a52a6 (diff) |
Build: Re-enable the /Zm workaround for MSVC (cotire version)
* Thanks Spec for reporting this issue
* See https://community.trinitycore.org/topic/120-compile-or-cmake-problems/?do=findComment&comment=83912
* Ref 697b4dbef20
(cherry picked from commit d3d003d69e91fb9b019a06b0402acebae5d6d250)
Diffstat (limited to 'cmake/macros')
-rw-r--r-- | cmake/macros/FindPCHSupport.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake index abe7f40d171..9c77605616b 100644 --- a/cmake/macros/FindPCHSupport.cmake +++ b/cmake/macros/FindPCHSupport.cmake @@ -1,3 +1,13 @@ +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() + include(cotire) function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER) |