<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.2817" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007>As I feared, this did not generate much traffic.&nbsp; 
Either we're mis-using CMake, or we have a peculiar setup.&nbsp; 
:)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007>In any case I went ahead and modified the vcproj 
generators in cmake so they don't output multiple instances of the same projecs 
within a given .sln file, and it solved our problem.&nbsp; Question is now, is 
there any interest for this behavior to make it into the CVS stream?&nbsp; 
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007>Regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=996262916-21052007>Stephane</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
cmake-bounces+stephane.rouleau=autodesk.com@cmake.org 
[mailto:cmake-bounces+stephane.rouleau=autodesk.com@cmake.org] <B>On Behalf Of 
</B>Stephane Rouleau (Consultant)<BR><B>Sent:</B> May 15, 2007 7:42 
PM<BR><B>To:</B> cmake@cmake.org<BR><B>Subject:</B> [CMake] ADD_SUBDIRECTORY() 
and mulitple PROJECT() definitions<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>We may be using 
cmake in strange new ways that were not expected (or intended), so if this is 
not exactly correct let me know and we'll stretch it in another 
direction...&nbsp; Also this may be a bit confusing, I'm trying to simplify our 
setup as much as possible for the purpose of this message.</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>CMakeLists.txt</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projA\CMakeLists.txt</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projB\CMakeLists.txt..</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>..</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>Nothing crazy so far 
-- what's in "root" basically will generate a top-level project, which can be 
used to build "all", and depends on projA and B.&nbsp; projA depends on nothing, 
and projB depends on projA.</FONT></SPAN></DIV><SPAN class=484140923-15052007>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><BR><FONT face=Arial><FONT 
size=2>We build out of tree, and know that, within a&nbsp;<SPAN 
class=484140923-15052007>given </SPAN>build tree, everything is 'compatible' -- 
as such, we only want to have a single .vcproj for every project.&nbsp; Thus 
when we perform the ADD_SUBDIRECTORY() on a given project, we use the same 
output folder, so that, in the end, we&nbsp;<SPAN class=484140923-15052007>end 
up with (using a Visual Studio 8 generator):</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV></SPAN><SPAN class=484140923-15052007><FONT face=Arial 
size=2>all.sln</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>all.vcproj</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projA\projA.sln</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projA\projA.vcproj</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projB\projB.sln&nbsp; (grabs ../projA.vcproj)</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projB\projB.vcproj</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>and 
NOT</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projB\projB.sln&nbsp; (grabs ./projA.vcproj)</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2>projB\projA.vcproj</FONT></SPAN></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN 
class=484140923-15052007>projB\projB.vcproj</SPAN></FONT></FONT></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2></FONT></SPAN><SPAN 
class=484140923-15052007><FONT face=Arial size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>the problem is that 
all.sln ends up with two Project() entries of "projA" -- one for itself, and one 
from projB.</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>Is it expected that 
ADD_SUBDIRECTORY() will add it in the current PROJECT(), but also in every 
parent PROJECT()?&nbsp; Is there a way around this?</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>(BTW, I just tried 
not sharing the projA.vcproj and generating two instances -- the resulting 
all.sln ends up with two copies of projA, with the same name, but in different 
locations, which is still not a valid solution.)</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial size=2>Stephane 
Rouleau</FONT></SPAN></DIV>
<DIV><SPAN class=484140923-15052007><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>