[CMake] makefile helper targets for generated source files.

James Bigler jamesbigler at gmail.com
Mon Apr 25 14:44:32 EDT 2011


On Mon, Apr 25, 2011 at 11:42 AM, Eric Noulard <eric.noulard at gmail.com>wrote:

> 2011/4/25 James Bigler <jamesbigler at gmail.com>:
> > If I have a custom command:
> >
> > add_custom_command(OUTPUT myfile.out)
> >
> > Then I add that file to the target:
> >
> > add_executable(mytarget main.cpp myfile.out)
> >
> > If I do a 'make help' I get rules for main.o, but none for myfile.out.
> Is
> > there something I can add to create a helper makefile target?
>
> I think there is no "help" for custom command
> but there should be one for custom **target**.
>
> You could try to :
> add_custom_target(myfile-out DEPENDS myfile.out COMMENT "Your help string")
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
>

Yeah, that's not going to work.  I can't have a target for every single
generated file in my build (10s to 100s).  That would make the VS solution a
nightmare.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110425/12485206/attachment.htm>


More information about the CMake mailing list