From 516ea66226d9306ed8ef6d2009feefdebd0b0974 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 31 Oct 2018 12:27:26 +0000
Subject: [PATCH 2/4] MSVC: Add bigobj flag

---
 CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 725c142..fc486c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,11 @@ if(WINDOWS)
   target_link_libraries(LIB_LIEF_SHARED ws2_32)
 endif()
 
+if(MSVC)
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
+endif(MSVC)
+
 target_compile_definitions(LIB_LIEF_STATIC PRIVATE -DLIEF_STATIC)
 target_compile_definitions(LIB_LIEF_SHARED PRIVATE -DLIEF_EXPORTS)
 if (LIEF_SUPPORT_CXX14)
-- 
2.19.1

