Hello Tyler,<br><br>Please find my comments below.<br><br><div class="gmail_quote">2009/5/29 Tyler Roscoe <span dir="ltr">&lt;<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Fri, May 29, 2009 at 01:45:45AM +0430, Dmytro Ovdiienko wrote:<br>
&gt; I prefer encapsulation of all library related information into the library.<br>
&gt; Only library know where it is located, where are public headers are located,<br>
&gt; where lib file is located. The way you proposed violates this encapsulation.<br>
<br>
</div>Fair enough. What I actually do is I have a separate file CMakeVars.txt<br>
where I define variable (such as source directories). This file is<br>
include()d both by the subproject (libA) and by any top-level projects<br>
that add_subdirectory() that subproject.<br>
</blockquote><div><br>So, you have to support additional file. You should remove extra variable from that CMakeLists.txt after you removed project. You have to add variable after you add new project. It is possible to get inconsistant file, so far.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
You could do the same thing with [set|get]_target_properties(). I do<br>
this in a few spots where my CMakeVars pattern doesn&#39;t work.<br>
</blockquote><div><br>Did not get. What do you mean?<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
This doesn&#39;t help with your ordering problem.<br>
<div class="im"></div></blockquote><div><br>Yeah. By David Cole I should merge A and B. But support right ordering of 30 projects... that may be not trivial.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&gt; I expected CMake to replace B_SOURCE_DIR with &lt;root&gt;/B and A_SOURCE_DIR with<br>
&gt; &lt;root&gt;/A. Thats all.<br>
<br>
</div>Well as you concisely stated at the beginning of this discussion, you<br>
have a circular dependency. Software is bad at handling circular<br>
dependencies, so it is your job as the human to jump in and decide how<br>
to break it up. We have discussed a number of strategies for doing this.<br>
<font color="#888888"><br>
tyler<br>
</font></blockquote></div><br>