<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 12:46 PM, Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net" target="_blank">a.neundorf-work@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday, April 06, 2015 21:19:57 Klaim - Joël Lamotte wrote:<br>
> On Mon, Apr 6, 2015 at 8:47 PM, Daniel Dilts <<a href="mailto:diltsman@gmail.com">diltsman@gmail.com</a>> wrote:<br>
> > I have a custom executable that does some codegen to produce an<br>
> > enumeration and a couple of tables.  I need this to be run against each<br>
> > source file before actual compilation.  It needs include directories and<br>
> > macro definitions from the build system.<br>
> ><br>
> > Is there a way to do this with a CMake build system?  add_custom_command<br>
> > seems like it might work, but I need all runs of the custom executable to<br>
> > run before compilation begins.<br>
><br>
> execute_process() might be what you want:<br>
> <a href="http://www.cmake.org/cmake/help/v3.2/command/execute_process.html" target="_blank">http://www.cmake.org/cmake/help/v3.2/command/execute_process.html</a><br>
<br>
<br>
</span>Hmmm, probably add_custom_command() or add_custom_target() is what he wants.<br>
Why does it have to run before the compilation begins ?<br>
<br></blockquote><div><br></div><div>thought-o uhmm... s/compilation/build of install/package targets/</div><div>actually needs to run after programs are built and before install...</div><div>add_custom_command with also add_custom target do not make the targets automatically building install... got far enough in MinGW to find that it's the same and I have to 'make generate_resources generate_app install -j 8' to get it to work</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Alex<br>
<div class="HOEnZb"><div class="h5"><br>
--<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</a><br>
</div></div></blockquote></div><br></div></div>