From f588568c534a737e523bac4367f80487099ec52b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 5 Oct 2018 20:20:16 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/2067: introduce /bigobj compiler flag --- CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ff139f22..9aa3efc8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,15 +217,13 @@ ENDIF( UNIX ) # Grouped compiler settings IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) # hide all not-exported symbols - SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -std=c++0x ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -std=c++0x -mbig-obj ${CMAKE_CXX_FLAGS}") SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS}") SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC ADD_COMPILE_OPTIONS(/MP) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - ADD_COMPILE_OPTIONS( /bigobj ) - ENDIF() + ADD_COMPILE_OPTIONS( /bigobj ) # disable "elements of array '' will be default initialized" warning on MSVC2013 IF(MSVC12) ADD_COMPILE_OPTIONS(/wd4351)