From b3da4060b84faa93680dabeb8b3b52f34615d8fd Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Tue, 1 Feb 2011 10:16:41 +0000
Subject: [PATCH] Add a compiler flag for windows compilers that have an issue
 with large objects that are generated by boost::python's template code. Re
 #1881

---
 Code/Mantid/Framework/PythonAPI/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Code/Mantid/Framework/PythonAPI/CMakeLists.txt b/Code/Mantid/Framework/PythonAPI/CMakeLists.txt
index 7f94a755bc3..619f18c5e78 100644
--- a/Code/Mantid/Framework/PythonAPI/CMakeLists.txt
+++ b/Code/Mantid/Framework/PythonAPI/CMakeLists.txt
@@ -55,6 +55,9 @@ set_property ( TARGET PythonAPI PROPERTY FOLDER "Framework" )
 # Library name needs to end in .pyd for Windows
 if ( WIN32 )
     set_target_properties ( PythonAPI PROPERTIES SUFFIX .pyd )
+    # Intensive use of templated libaries can cause large objects to be generated. These require
+    # an additional flag in MSVC.
+    set_target_properties ( PythonAPI COMPILE_FLAGS "/bigobj" )
 endif ()
 # Debug python library expects imported module names to end in _d
 if ( PYTHON_DEBUG_LIBRARY )
-- 
GitLab