2011/7/12 Jean-Christophe Fillion-Robin <span dir="ltr">&lt;<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Daniel, <br><br>This sounds like a great feature :), do you think you could also associate a test with your changes ? <br></blockquote><div><br>Done. I have updated the test and the documentation. Everything is in the &#39;genexp&#39; branch of git://<a href="http://github.com/purpleKarrot/CMake.git">github.com/purpleKarrot/CMake.git</a><br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Out of curiosity, why &quot;<i>the right set of include directories is unknown until all components<br>



have been processed</i>&quot; ?<br><br>If it resumes not to be the case, I believe using a CMakeCache variable could do the job. <br><br>For example:<br><br><font style="font-family:courier new,monospace" size="1"># Clear foo bar<br>


set(FOOBAR_DIRS &quot;&quot; CACHE STRING &quot;Foobar dirs&quot; FORCE)<br><br>...<br><br>add_subdirectory(C)<br>set(C_DIRS ..) # Collect C directories<br>set(FOOBAR_DIRS ${FOOBAR_DIRS} ${C_DIRS} CACHE STRING &quot;Foobar dirs&quot; FORCE)<br>





include_directories(${FOOBAR_DIRS})<br>


add_libraries(C ...)<br><br><br>...<br><br></font><font style="font-family:courier new,monospace" size="1">add_subdirectory(B)</font><br><font style="font-family:courier new,monospace" size="1">set(B_DIRS ..) # Collect B directories<br>


set(FOOBAR_DIRS ${FOOBAR_DIRS} ${B_DIRS} CACHE STRING &quot;Foobar dirs&quot; FORCE)<br>
include_directories(${FOOBAR_DIRS})<br>
add_libraries(B ...)<br><br>...<br><br></font><font style="font-family:courier new,monospace" size="1">add_subdirectory(A)</font><br><font style="font-family:courier new,monospace" size="1">set(A_DIRS ..) # Collect A directories<br>


set(FOOBAR_DIRS ${FOOBAR_DIRS} ${A_DIRS} CACHE STRING &quot;Foobar dirs&quot; FORCE)<br>
include_directories(${FOOBAR_DIRS})<br>
add_libraries(A ...)</font><br></blockquote><div> <br>This works for the simple A-&gt;B-&gt;C dag from my example, but only because you already knew the dependencies. Otherwise you would not have reordered them. What if additionally C depends on A?<br>
<br>cheers, Daniel<br></div></div>