[CMake] How to turn off incremental linking for MSVC Debug and RelWithDebInfo targets?
John Drescher
drescherjm at gmail.com
Thu Feb 11 19:04:23 EST 2010
On Thu, Feb 11, 2010 at 6:46 PM, Erwin Coumans <erwin.coumans at gmail.com> wrote:
>
> I can't find where this INCREMENTAL:YES is coming from.
> Is there a better way than hacking the 'cmLocalVisualStudio7Generator
> ::GetBuildTypeLinkerFlags'
> to replace INCREMENTAL:YES by INCREMENTAL:NO?
> Thanks a lot,
> Erwin
I think it is set in here:
cmake-2.8\Modules\Platform\Windows-cl.cmake
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp
# on versions that support it
SET( MSVC_INCREMENTAL_YES_FLAG "")
IF(NOT MSVC_INCREMENTAL_DEFAULT)
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
ENDIF()
IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept
${MSVC_INCREMENTAL_YES_FLAG}")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug
/pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug
${MSVC_INCREMENTAL_YES_FLAG}")
ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
# for release and minsize release default to no incremental linking
John
John
More information about the CMake
mailing list