From 7f5ad2435b48b296eb8798d9aacedc7fb706e477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Do=C5=82bniak?= Date: Sat, 12 Oct 2019 00:49:03 +0200 Subject: [PATCH] Set the bigobj compilation flag for MSVC (#3765) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 086ab61a6ab..cb0800e14ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,10 @@ if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio.*$") set(MSVS TRUE) endif() +if (CMAKE_CXX_COMPILER_ID MATCHES MSVC) + add_definitions(/bigobj) +endif() + # APPLE: Set CMAKE_OSX_SYSROOT if not set already. if (APPLE) execute_process(COMMAND sw_vers -productVersion