Timo Rumland wrote:
Hello,

Have you tried CONFIGURE_FILE() ? You can use it to replace
variables.
CONFIGURE_FILE(myfile ${CMAKE_CURRENT_BINARY_DIR}/myfile-copy)

I can use CONFIGURE_FILE to copy the file, but I have to edit the
content of the file (that goes beyond just replacing VARS in the
file).

I must use a regex to do a string replace. The STRING function can do
this, but only on variables, not files. So I have to read a file into
a variable, change the variable with STRING and finally write it out
into a new file.

In that case you have to quote the variable. ";" is used as a list separator.
file( WRITE ${filename2} "${tmp_filecontent}" )



Timo
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake


_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to