[CMake] Generating files during building

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu May 31 18:35:35 EDT 2007


On 2007-05-31 15:30-0400 Alexander Neundorf wrote:

> On Thursday 31 May 2007 15:16, Alan W. Irwin wrote:
>> Hi Gustavo:
> ...
>> I am not sure the following is necessary if the source files are built in
>> the same directory where they are needed, but for the case where source
>> files are built in a different directory (the case for my generated
>> header), you must have your executable or library target depend on an empty
>> custom target which in turn depends on your custom command to insure the
>> source files get built before they need to be compiled.
>>
>> In any case, I do not think multiple invocations of cmake will be necessary
>> in order to use generated source files.
>
> But if I understand correctly then at cmake time the files which will have to
> be compiled are not yet known, right ?
> I think this is a problem.

Probably since you are more a CMake expert than me.  :-)

However, what then is the purpose of the SET_SOURCE_FILES_PROPERTIES GENERATED
property?  I have never used that flag, but I cannot think of any use for
it except the present situation.

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