MSVC: Disable incremental linking for WindowsPhone and WindowsStore

Do not add a "/INCREMENTAL" flag when using the toolchains for these
systems.
This commit is contained in:
Gilles Khouzam 2014-07-28 14:50:57 -04:00 committed by Brad King
parent 592098e2d5
commit 1c94558abb
1 changed files with 6 additions and 4 deletions

View File

@ -199,11 +199,13 @@ unset(_MACHINE_ARCH_FLAG)
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype # add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
# on versions that support it # on versions that support it
set( MSVC_INCREMENTAL_YES_FLAG "") set( MSVC_INCREMENTAL_YES_FLAG "")
if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE)
if(NOT MSVC_INCREMENTAL_DEFAULT) if(NOT MSVC_INCREMENTAL_DEFAULT)
set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
else() else()
set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
endif() endif()
endif()
if (CMAKE_COMPILER_SUPPORTS_PDBTYPE) if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}") set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")