[CMake] Cmake 2.6.0 release and _Util project on Visual studio 2003

Markus Israelsson markus.israelsson at sensegraphics.com
Tue May 13 03:43:06 EDT 2008


Hello,

In all my installation of visual studio the automatic linking is there
when it depends on a target. I have not managed to find any way of
shutting it off. So until I do I will consider the Cmake behaviour of
generating extra projects for visual studio 2003 and not 2005 and 2008 a
bug. It should behave the same way for all.

If I have a project A that depends on B in visual studio dependencies
but B is not listed in the libraries to link against in A:s project
settings it will still required B.lib when linking. A and B are shared
libraries. I know this is the case (for me) because if B does not
generate a lib-file A will fail to build with the message that "B.lib"
can not be found.

Tested on visual studio 2003, 2005 express and 2008.

Installed in the order of 2003, 2005 express and then 2008. Maybe that
has something to do with it but since I can't find the settings I doubt
it.

-Markus

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: den 9 maj 2008 15:19
To: Markus Israelsson
Cc: cmake at cmake.org
Subject: Re: [CMake] Cmake 2.6.0 release and _Util project on Visual
studio 2003

Markus Israelsson wrote:
> Ok,
> 
> Then I understand the CMake concept and how it differs from the 
> concept in visual studio. We use the TARGET_LINK_LIBRARIES for 
> non-win32 platforms (good to know that it is for all makefiles) to add

> it for linking. The reason for not having it on win32 (visual studio 
> in our
> case) is simply because of cosmetic reasons. We will have to change it

> I guess. It seems though like the linking part takes place no matter 
> which version of visual studio is used. Should not the extra _UTIL 
> projects be created for other versions of visual studio?
> 

Newer versions of visual studio do not automatically link if you depend
on targets.  I think there was a feature request for CMake to turn on
this feature in newer versions of visual studio recently on this list. 
Since it is not really portable to even makefiles for the same compiler,
I don't think it will be added.

-Bill


More information about the CMake mailing list