[CMake] Newbie question: generated header file howto
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Thu Jan 10 20:23:37 EST 2008
On 2008-01-11 08:05+1100 Pacesie wrote:
> If I want to generate document files as part of the build, should I first
> create an ADD_CUSTOM_TARGET then have it depends on the generated files
> defined by ADD_CUSTOM_COMMAND? ( It would be nice if file generation can be
> defined as a target so the extra step is not needed. )
You can generate the files by the appropriate custom target command, but that
will get executed for every "make" command so normally custom targets are
done without any associated command, and instead file depend on custom
commands (which are only run if the output file actually needs updating).
>
> Do the targets always run by the order that they are defined in CMakeLists
> (unless there are dependency) ? So that if I want to be sure a target is run
> before all others, I define it first in CMakeLists?
If order is important between your various targets, enforce that with a
target dependency.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list