[CMake] file(WRITE) versus configure_file
Eric Noulard
eric.noulard at gmail.com
Thu Jun 4 17:58:35 EDT 2009
2009/6/4 James Bigler <jamesbigler at gmail.com>:
> Back in the day before file(WRITE) there was write_file(). write_file() had
> the problem that you couldn't use the file as input to CMake, so you had to
> use configure_file.
What do you mean as "input", you mean a source file in
add_library or add_executable?
> Does file(WRITE) have this same restriction?
Don't know but I guess that now you can:
set_property(SOURCE blah.h PROPERTY GENERATED TRUE)
or
set_source_files_properties(blah.h PROPERTIES GENERATED TRUE)
I guess it should work even if blah.h is generated at CMake time.
> I currently use a blank template file for configure_file for one of my
> projects, and it would be nice to do away with this and just write a blank
> file when I need to.
Could you explain what do you mean by "blank file"?
--
Erk
More information about the CMake
mailing list