Turn on /bigobj for MSVC as release objs with swigwin exceed the standard limit

This commit is contained in:
Marek Roszko 2021-01-12 19:43:25 -05:00
parent d23b5f89b3
commit 3ad0e5d8bf
1 changed files with 2 additions and 0 deletions

View File

@ -404,6 +404,8 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# /GF: enable string pooling
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
# Avoid fatal error because /GF + swig wrapper exceed standard obj file limits
string( APPEND CMAKE_CXX_FLAGS " /bigobj" )
foreach( type EXE SHARED MODULE)
# /DEBUG: create PDB
string( APPEND CMAKE_${type}_LINKER_FLAGS " /DEBUG /MANIFEST:NO" )