From 1c94558abb653968de6da2cb4672006f31ca0d14 Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Mon, 28 Jul 2014 14:50:57 -0400 Subject: [PATCH] MSVC: Disable incremental linking for WindowsPhone and WindowsStore Do not add a "/INCREMENTAL" flag when using the toolchains for these systems. --- Modules/Platform/Windows-MSVC.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e51c59285..b0d3e49a4 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -199,10 +199,12 @@ unset(_MACHINE_ARCH_FLAG) # add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype # on versions that support it set( MSVC_INCREMENTAL_YES_FLAG "") -if(NOT MSVC_INCREMENTAL_DEFAULT) - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") -else() - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) +if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE) + if(NOT MSVC_INCREMENTAL_DEFAULT) + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") + else() + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) + endif() endif() if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)