<div><br></div>Thanks John, it has been a painful cmake experience to turn off incremental linking for debug builds.<div><br></div><div>Apparently, the SET(MSVC_INCREMENTAL_DEFAULT ON) has to appear before the PROJECT line, otherwise it doesn't work.</div>
<div>Here is the solution that works for me, hope this saves others time:</div><div><br></div><div>----------------------------------</div><div><br></div><div>#this line has to go before PROJECT</div><div><div>SET(MSVC_INCREMENTAL_DEFAULT ON)</div>
<div>PROJECT(BULLET_PHYSICS)</div><div><span class="Apple-tab-span" style="white-space: pre; "><br></span></div><div>STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_EXE_LINKER_FLAGS_DEBUG}) </div>
<div>SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/INCREMENTAL:NO ${replacementFlags}" )</div><div><br></div><div>STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags3 ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO})</div>
<div>SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/INCREMENTAL:NO ${replacementFlags3}" )</div><div><br></div><div>----------------------------------</div><div><br></div></div><br><div class="gmail_quote">On 11 February 2010 16:04, John Drescher <span dir="ltr"><<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Thu, Feb 11, 2010 at 6:46 PM, Erwin Coumans <<a href="mailto:erwin.coumans@gmail.com">erwin.coumans@gmail.com</a>> wrote:<br>
><br>
> I can't find where this INCREMENTAL:YES is coming from.<br>
> Is there a better way than hacking the 'cmLocalVisualStudio7Generator<br>
> ::GetBuildTypeLinkerFlags'<br>
> to replace INCREMENTAL:YES by INCREMENTAL:NO?<br>
> Thanks a lot,<br>
> Erwin<br>
<br>
</div>I think it is set in here:<br>
<br>
cmake-2.8\Modules\Platform\Windows-cl.cmake<br>
<br>
<br>
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp<br>
# on versions that support it<br>
SET( MSVC_INCREMENTAL_YES_FLAG "")<br>
IF(NOT MSVC_INCREMENTAL_DEFAULT)<br>
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")<br>
ENDIF()<br>
<br>
IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)<br>
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept<br>
${MSVC_INCREMENTAL_YES_FLAG}")<br>
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug<br>
/pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")<br>
ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)<br>
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")<br>
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug<br>
${MSVC_INCREMENTAL_YES_FLAG}")<br>
ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)<br>
# for release and minsize release default to no incremental linking<br>
<br>
John<br>
<font color="#888888"><br>
John<br>
</font></blockquote></div><br>