[CMake] string replacement without external commands help (ex.
sed)
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Tue Aug 21 12:23:09 EDT 2007
On 2007-08-21 18:30+0300 Dizzy wrote:
> On Tuesday 21 August 2007 18:22:25 Alexander Neundorf wrote:
>
>> Why do you need this from add_custom_command() ?
>
> So that I have the config file generation like a normal "build" target that
> depends on it's input file (ie project.conf is generated from project.conf.in
> and is only updated if there is no project.conf or project.conf.in has been
> updated in the meantime, just as any other target building dependency). Can I
> do it some other way?
>
>> I would suggest using plain configure_file().
Seconded. CONFIGURE_FILE() properly handles the dependency of project.conf
on the template file project.conf.in configure_file() which addresses your
above dependency concern. Try CONFIGURE_FILE(), and you will like it.
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