[CMake] Did anyone manage to get incremental linking working with NMake generator?

Bill Hoffman bill.hoffman at kitware.com
Wed Dec 8 23:10:45 EST 2010


On 12/8/2010 10:18 PM, Bill Hoffman wrote:
> On 12/8/2010 4:21 PM, Gabriel Petrovay wrote:
>> Yes I did. That is why I am wrote this post. Regardless of previous
>> build. I always get:
>> LINK : examples.exe not found or not built by the last incremental
>> link; performing full link
>>
>
> Try a make VERBOSE=1 with the /incremental:yes on, and post the results
> of the second build that should be incremental.
>

Never mind, I have reproduced the problem.  It seems like the 
incremental linking is broken for VS 2010 nmake.

To get it to work, you have to do add /INCREMENTAL:YES to 
CMAKE_EXE_LINKER_FLAGS_DEBUG, you get a warning but it does the correct 
thing with mt and the incremental linking:

[ 75%] Built target simpleLib
Scanning dependencies of target Simple
[100%] Building CXX object CMakeFiles/Simple.dir/simple.cxx.obj
simple.cxx
Linking CXX executable Simple.exe
LINK : warning LNK4224: /INCREMENTAL:YES is no longer supported;  ignored
[100%] Built target Simple

I will have to figure out a new way to add incremental linking to VS2010.

-Bill




More information about the CMake mailing list