<div dir="ltr">Hi, <div><br></div><div style>If it turns out to be usefull for you. We could also consider creating a dedicated github project to avoid code duplication. That way you would be able to either add it as a git submodule to your project or checkout this new small project at configure time [1]</div>
<div style><br></div><div style>Hth</div><div style>Jc</div><div style><br></div><div style>[1] <a href="http://cmake.3232098.n2.nabble.com/is-it-possible-to-download-CMake-modules-at-configure-time-td7583968.html">http://cmake.3232098.n2.nabble.com/is-it-possible-to-download-CMake-modules-at-configure-time-td7583968.html</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 24, 2013 at 5:32 PM, Volo Zyko <span dir="ltr"><<a href="mailto:volo.zyko@gmail.com" target="_blank">volo.zyko@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jean-Christophe,<div><br></div><div>Thanks for the suggestion. We'll definitely consider it.</div>
<div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div dir="ltr"> Volo Zyko</div></font></span><div><div class="h5"><br><div class="gmail_quote">
On Thu, Apr 25, 2013 at 12:23 AM, Jean-Christophe Fillion-Robin <span dir="ltr"><<a href="mailto:jchris.fillionr@kitware.com" target="_blank">jchris.fillionr@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hi Volo, <div><br></div><div>If you are doing some topological sorting to build your library/executable in the right order. Instead of using CMake based solution, you could may be rely on a C++ approach ? This is what we are doing in CTK. We are using a small prog named ctkDependencyGraph that we build at configure time.</div>
<div>See [1-4]</div><div><br></div><div>[1] <a href="http://www.commontk.org/index.php/Documentation/BuildSystem_Description" target="_blank">http://www.commontk.org/index.php/Documentation/BuildSystem_Description</a></div>
<div>[2] <a href="https://github.com/commontk/CTK/blob/master/CMakeLists.txt#L691-717" target="_blank">https://github.com/commontk/CTK/blob/master/CMakeLists.txt#L691-717</a></div><div>[3] <a href="https://github.com/commontk/CTK/blob/master/CMake/ctkFunctionGenerateDGraphInput.cmake" target="_blank">https://github.com/commontk/CTK/blob/master/CMake/ctkFunctionGenerateDGraphInput.cmake</a></div>
<div>[4] <a href="https://github.com/commontk/CTK/blob/master/CMake/ctkMacroValidateBuildOptions.cmake#L127-150" target="_blank">https://github.com/commontk/CTK/blob/master/CMake/ctkMacroValidateBuildOptions.cmake#L127-150</a> </div>
</div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Wed, Apr 24, 2013 at 5:13 PM, Volo Zyko <span dir="ltr"><<a href="mailto:volo.zyko@gmail.com" target="_blank">volo.zyko@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">We have executables and libraries and a lot of custom targets (the project is organized so that we export headers during the build - not the best idea in the world). However, I finished (more or less) the script for building time stats from the cmake's trace and we (with my colleague) found the slowest part. In our cmake scripts we have a bunch of sub-projects which produce libraries and also we have an utility function with which we define dependencies between those sub-projects. Then we define executables and build a list of libraries in a right order (from more dependent to less dependent) using sub-project's dependencies. This list is necessary for linking the executables. So, it appears that the slowest part is the function that builds the list of libraries. Basically there is nothing wrong with that cmake function, it just intensively works with strings. :(<div>
<div class="gmail_extra"><br></div><div class="gmail_extra">And here is where I put my script: <a href="https://code.google.com/p/cmake-profile-stats/" target="_blank">https://code.google.com/p/cmake-profile-stats/</a> Comments are welcome.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Also it looks like there are few bugs in the trace functionality of cmake; especially how callstack changes when cmake process foreach and if/else calls. I just didn't investigate them and I cannot provide more details. Sorry.</div>
<span><font color="#888888">
</font></span><div class="gmail_extra"><span><font color="#888888"><br>-- <br><div class="gmail_quote"> Volo Zyko</div></font></span><div><div><div class="gmail_quote"><br></div><div class="gmail_quote">
On Wed, Apr 24, 2013 at 10:14 PM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On 4/24/2013 3:07 PM, Volo Zyko wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi,<br>
<br>
We use Makefiles on Linux and MacOS. Windows is not our target platform.<br>