[CMake] [cmake 2.5] Double linking?

Bill Hoffman bill.hoffman at kitware.com
Mon Jan 7 08:40:40 EST 2008


Christian Ehrlicher wrote:
> Hi,
> 
> When linking a lib with cmake 2.5cvs it looks like the lib is linked twice:
> 
> ------------------8<-------
> Linking CXX shared library ..\bin\kdeui.dll
>    Bibliothek "..\bin\kdeui.lib" und Objekt "..\bin\kdeui.exp" werden
> erstellt.
>    Bibliothek "..\bin\kdeui.lib" und Objekt "..\bin\kdeui.exp" werden
> erstellt.
> ------------------8<-------
> 
> 
> Any ideas?
> 
Yes, this is my doing.  This is the crazy manifest stuff that you have 
to do.   Prior to about a week ago incremental linking did not work at 
all with nmake/make and visual studio 8 and greater.  This is because we 
embed the manifest with the mt tool.  This invalidates the file for 
incremental linking. The trick is to embed the manifest into a resource 
that is incrementally linked into the exe/dll.  So, the second link is 
an incremental one, and the only thing that should change is the 
manifest resource, so it should be quick.  For more information on this, 
see this page:
http://blogs.msdn.com/zakramer/archive/2006/05/22/603558.aspx

BTW, it should only do the double link the first time, unless the 
manifest changes.

-Bill


More information about the CMake mailing list