On Sat, Sep 12, 2009 at 2:45 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
True, but then you wouldn't point it at a binary directory. AFAIK, if you point project A at an out-of-source source, say project B, that project B will be built completely within the binary tree of A.<br><font color="#888888">
<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#888888"><br></font></font></font></blockquote><div><br></div><div>The second argument to add_subdirectory allows you to put the binary tree of "project B's build tree within project A" anywhere you want...</div>
<div><br></div><div>Of course, it should not be the same as a build tree of "standalone project B".... Because that's a different build.</div><div><br></div><div>Perhaps that's where the confusion is in this case?</div>
<div><br></div><div>Pierre-Julien, is that what you are expecting? When you use add_subdirectory, you should typically leave off the 2nd argument unless you just want to organize things differently than CMake does by default. But if you do use it, make sure that the directory you give it is unique across all other projects that you build. "B built within A" is different than "standalone B" -- do not try to mix and match builds with add_subdirectory -- use it as a convenient way of building a project as a component of another project...</div>
<div><br></div><div>Does that help?</div><div><br></div><div>Hope so,</div><div>David</div><div><br></div></div>