[CMake] FILE command in make_custom_target

Brandon Van Every bvanevery at gmail.com
Tue Jun 19 18:07:57 EDT 2007


On 6/19/07, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Philippe Fremy wrote:
> >
> > It is ironic that a running cmake instance, that supports platform
> > agnostic directory creation, is not able to do that inside a rule and
> > has to fallback an calling a second cmake instance for that.
> >
> >
> Actually, when a custom command is run, there is no running cmake
> instance.  That is run
> during build time, and at that point cmake is no longer running, make,
> or some IDE is running.

I guess the desire here, is for CMake script commands to be available
inside of custom commands, and for these to generate the right things
inside of native build files.  But technically speaking, that may be
too much to ask in general.  I wonder if it's worth asking for some
things specifically.  Things that people might expect a native build
file to be able to do.  But then, I guess Makefiles can't do didly
squat for the most part.  So I guess the *really cool* capability, is
if "CMake -E whatever" could be automagically substituted for certain
simple operations.

In terms of documentation and user expectation, it might be odd to
support certain CMake script commands directly inside a COMMAND, and
not others.  But maybe it's useful enough not to care too hard about
the consistency?  The big caveat is always going to be, "you can't
have a MACRO inside a custom COMMAND."  Maybe that would take care of
people's expectations right there.


Cheers,
Bra


More information about the CMake mailing list