[CMake] Running custom executable

J Decker d3ck0r at gmail.com
Tue Apr 7 15:51:26 EDT 2015


On Tue, Apr 7, 2015 at 12:46 PM, Alexander Neundorf <a.neundorf-work at gmx.net
> wrote:

> On Monday, April 06, 2015 21:19:57 Klaim - Joël Lamotte wrote:
> > On Mon, Apr 6, 2015 at 8:47 PM, Daniel Dilts <diltsman at gmail.com> wrote:
> > > I have a custom executable that does some codegen to produce an
> > > enumeration and a couple of tables.  I need this to be run against each
> > > source file before actual compilation.  It needs include directories
> and
> > > macro definitions from the build system.
> > >
> > > Is there a way to do this with a CMake build system?
> add_custom_command
> > > seems like it might work, but I need all runs of the custom executable
> to
> > > run before compilation begins.
> >
> > execute_process() might be what you want:
> > http://www.cmake.org/cmake/help/v3.2/command/execute_process.html
>
>
> Hmmm, probably add_custom_command() or add_custom_target() is what he
> wants.
> Why does it have to run before the compilation begins ?
>
>
thought-o uhmm... s/compilation/build of install/package targets/
actually needs to run after programs are built and before install...
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



> Alex
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150407/94029d30/attachment-0001.html>


More information about the CMake mailing list