We used also a similar approach in CTK. <br><br>See <a href="http://www.commontk.org/index.php/Documentation/BuildSystem_Description">http://www.commontk.org/index.php/Documentation/BuildSystem_Description</a> and also [1] and [2]<br>
<br>Relaying on small executable named DGraph built at configure time, we manage to obtain the topological order of CTK plugins, apps and libraries. The tool also check for cycle and output a human readable message if there are any cycle.<br>
<br>Note also that each library, plugins and app has access to only the include directories it should.<br><br>If I remember properly, Sasha from <span class="st">the German Cancer Research Center (DKFZ)</span> did some work factorizing out the CMake code so that it could easily be re-used.<br>
<br>Sasha> Could you comment ? <br><br>Thanks<br>Jc<br><br> [1] <a href="http://www.commontk.org/docs/html/group__CMakeAPI.html">http://www.commontk.org/docs/html/group__CMakeAPI.html</a> [2] <a href="http://www.commontk.org/docs/html/group__CMakeUtilities.html">http://www.commontk.org/docs/html/group__CMakeUtilities.html</a><br>
<br><div class="gmail_quote">On Mon, Jul 25, 2011 at 1:16 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 07/25/2011 12:00 PM, Daniel Pfeifer wrote:<br>
> what is your opinion on the $<> syntax I originally proposed?<br>
> This would not require creating virtual targets for header only libraries.<br>
<br>
</div>The implementation is just doing delayed variable evaluation and<br>
is not a true generator expression in the same sense as is used<br>
by add_test and add_custom_command. The latter support only<br>
generator-defined specific expressions with very specific syntax<br>
that can be validated. The FinalPass of commands is an ancient<br>
implementation detail which exists only in a few commands for<br>
historical reasons and should not be used in new commands.<br>
<br>
The proposed solution is to use delayed evaluation to work around<br>
lack of dependency-sorted ordering. The topological sort already<br>
used by the Boost CMake solves this problem in a better way. The<br>
ITK project already does CMake-time module dependency detection<br>
and sorting using a similar approach. It correctly handles the<br>
generation of include directories for each module. It also handles<br>
header-only modules. Unfortunately the implementation is embedded<br>
in ITK's CMake code and is not (yet) easily generalizable.<br>
<font color="#888888"><br>
-Brad<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>