<div dir="ltr"><div>Thank you Mark for hint about that solution. I think the l<span id="result_box" class="" lang="en"><span class="">osses may</span> <span class="">be reduced by distributing #includes directives across many well known files (as in  example: GenChunk.tar) Those chunks can be already compiled in parallel. <br><br></span></span></div><span id="result_box" class="" lang="en"><span class="">Best regards, Tomasz.<br></span></span><div><div><span id="result_box" class="" lang="en"><span class=""><br></span></span><div class="gmail_extra"><br><div class="gmail_quote">2015-03-12 17:50 GMT+01:00 Mark Abraham <span dir="ltr"><<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">In that case, you could have the generator generate a master source file with a known name that #includes the real generated files. This means that the generation can have clean dependencies, but does lose any benefits from parallel make. It also keeps the intrinsic complexity of the generation close to itself, rather than unduly complicating the build system. Up to you. </p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Mark </p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On 11/03/2015 6:40 pm, "Tomasz Majchrowski" <<a href="mailto:contact@majchrowski.de" target="_blank">contact@majchrowski.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Thank you Mark for information. The input for the generator is in-house developed language. The decision what kind of files will be generated is made based on the grammar of this language. <br><br></div>In the current implementation of the generator the extraction of the file list will take more or less the same time as execution of the generation phase itself. Otherwise we will definitely use make phase.<br><br></div><div>Best regards, Tomasz.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-11 0:15 GMT+01:00 Mark Abraham <span dir="ltr"><<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Sure, this is straightforward to do all at make time, if you're prepared to find out what the names of the generated files are. They must follow some pattern ;-). Solutions with make-time globbing are surely impossible, and Petr's IF idea seems brittle to me.</div><div><br></div><div>See (for example) <a href="https://github.com/gromacs/gromacs/blob/master/src/gromacs/CMakeLists.txt#L154" target="_blank">https://github.com/gromacs/gromacs/blob/master/src/gromacs/CMakeLists.txt#L154</a>. The idea is that you have some target that does the generation, and you make the eventual library/executable depend on its output files. The target that contains the generation command has its own dependencies, so you don't have to re-generate if those don't go out of date. In that example, gmx_configure_version_file just wraps configure_file(), which sets up that dependency chain. You'd need an add_custom_command(), it seems, whose OUTPUT had the list of generated files. There's no problem to use add_library() with a file generated in the build tree - just mention it in an output.</div><div><br></div><div>There are several much more complicated examples at <a href="https://github.com/gromacs/gromacs/blob/master/docs/CMakeLists.txt" target="_blank">https://github.com/gromacs/gromacs/blob/master/docs/CMakeLists.txt</a>. For example, we build a gmx binary that writes the same text we display with "gmx topic -h" instead as topic.rst restructedText, which is then parsed with Sphinx to produce manpages that go in the tarball via CPack, or to produce HTML to go on our webpage. Helper scripts mostly live in <a href="https://github.com/gromacs/gromacs/tree/master/cmake" target="_blank">https://github.com/gromacs/gromacs/tree/master/cmake</a></div><div><br></div><div>Cheers,</div><div><br></div><div>Mark</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 6:06 PM, Tomasz Majchrowski <span dir="ltr"><<a href="mailto:usenet@majchrowski.de" target="_blank">usenet@majchrowski.de</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"><div><div>(sorry if you received this message twice)<br><br>Hi Mark <br><br></div><span>This is the  set of C++ source code 
files. This set will be compiled during the make stage. Ideally will be 
to move generation to make stage. Unfortunately I don't  know the name 
of the files that will be generated before generation phase occurs.<br><br>Therefore
 I can't use set_source_files_properties( foo.cxx PROPERTIES GENERATED 
true) in cmake stage. Please drop a line if you know how to bypass this 
limitation.<br><br></span></div>Thanks, Tomasz.</div><div class="gmail_extra"><br><div class="gmail_quote"><span>2015-03-10 7:05 GMT+01:00 Mark Abraham <span dir="ltr"><<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>></span>:<br></span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi,</p>
<p dir="ltr">What are you generating that must be done at cmake time? </p>
<p dir="ltr">Mark </p>
<div class="gmail_quote"><div><div>On 09/03/2015 5:36 pm, "Tomasz Majchrowski" <<a href="mailto:usenet@majchrowski.de" target="_blank">usenet@majchrowski.de</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div>Hi, <br><br></div>I'm wondering if there is an easy 
way to control the dependencies in the cmake stage. Basically I would 
like skip execution of some script run over execute_process in case some
 input files didn't change. <br><br></div>The regular way will be to use add_custom_command & add_custom_target however those required targets, so the make stage. <br><br></div>Please advice how to proceed in case there is need to control this already in cmake stage?<br><br></div>Thanks, Tomasz.<br clear="all"><br clear="all"><br>-- <br><div>Pozdrawiam/Best regards/<span>Mit freundlichen Grüßen, Tomasz Majchrowski</span>,<br>Information Technology and Services Consultant and Contractor</div>

</div>
<br></div></div>--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake<br clear="all"><br>-- <br><div>Pozdrawiam/Best regards/<span>Mit freundlichen Grüßen, Tomasz Majchrowski</span>,<br>Information Technology and Services Consultant and Contractor</div>
</a></blockquote></div>
</blockquote></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>Pozdrawiam/Best regards/<span>Mit freundlichen Grüßen, Tomasz Majchrowski</span>,<br>Information Technology and Services Consultant and Contractor<br clear="all"><br>-- <br><div class="gmail_signature">Pozdrawiam/Best regards/<span>Mit freundlichen Grüßen, Tomasz Majchrowski</span>,<br>Information Technology and Services Consultant and Contractor</div>
</div>
</div></blockquote></div></div></div></blockquote></div></div></div></div></div>