changeset 3246:ae68bf751187

increasing heap size of visual studio 2015
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 16 Feb 2019 11:17:19 +0100
parents 8b091a51b1b9
children c2798f7daf8b
files Resources/CMake/Compiler.cmake
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake	Sat Feb 16 10:29:51 2019 +0100
+++ b/Resources/CMake/Compiler.cmake	Sat Feb 16 11:17:19 2019 +0100
@@ -36,8 +36,14 @@
     string(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
   endforeach(flag_var)
 
-  # Add /Zm256 compiler option to Visual Studio to fix PCH errors
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm256")
+  if (BOOST_LOCALE_BACKEND STREQUAL "icu")
+    # If compiling icu, the heap space must be further increased:
+    # "icudt58l_dat.c(1638339): fatal error C1060: compiler is out of heap space"
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm512")
+  else()
+    # Add /Zm256 compiler option to Visual Studio to fix PCH errors
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm256")
+  endif()
 
   add_definitions(
     -D_CRT_SECURE_NO_WARNINGS=1