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

Markus Israelsson markus.israelsson at sensegraphics.com
Fri May 9 07:04:58 EDT 2008


Hello,
 
I am wondering if anyone can shed some light on where the
<ProjectName>_Util projects come from and why they are constructed for
visual studio 2003 when using the ADD_DEPENDENCIES property of CMake.
They do not show up when generating project for other versions of visual
studio and do not show up when using version 2.4.8 of CMake.
 
What I have done is basically this (pseudo-code, hope it is
understandable):
 
PROJECT( FirstProject )
 
ADD_SUBDIRECTORY( SecondProject ) - adds a library called SecondProject.

ADD_LIBRARY( FirstProject )

ADD_DEPENDENCIES( FirstProject SecondProject )
 
This will create a solution file with these project in visual studio
2005 and 2008.
 
ALL_BUILD
FirstProject
SecondProject
ZERO_CHECK
 
FirstProject depends on SecondProject when checking dependency setting
in visual studio.
 
However for visual studio 2003 the solution file will look like this.
 
ALL_BUILD
FirstProject
SecondProject
SecondProject_UTIL
ZERO_CHECK
 
FirstProject will depend on SecondProject_UTIL which depends on
SecondProject. This will of course give a lot of linking errors when
building. Firstly because the _UTIL project is empty, neither Pre-Build
Events nor Post-Build Events are set. Secondly because the _UTIL project
is never built by default.
 
In order to fix this I have to manually correct the dependencies for
visual studio 2003. Pretty irritating since when anything is changed in
the CMakeLists used for generating the solution file the dependencies
has to be fixed again.
 
Every project that some other project is dependent on generates this
extra _UTIL project.
 
Hope anyone can shed some light on the use of this or have encountered
the problem.
 
best regards, appreciate any help,
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080509/fb2fd74e/attachment.htm>


More information about the CMake mailing list