diff --git a/CMakeLists.txt b/CMakeLists.txt index 515e49d8..6fd936b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,6 +113,13 @@ if(NOT MSVC) endif() endif() +if (MSVC) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} /bigobj" + ) +endif() + if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES)) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."