[CMake] Reading the content of a file

Timo Rumland cr at olympclan.de
Sun Feb 25 07:01:14 EST 2007


Hello,

what I must do is:

 1. Read the content of a file
 2. Modify the content (variable)
 3. Write out the content into a new file


But when I read a file into a variable with

  file( READ ${filename} tmp_filecontent )

and then write it out with

  file( WRITE ${filename2} ${tmp_filecontent} )


The result is not a copy of the file, but the new file has no single
";" anymore. Why are the ";" gone? Is there a way to keep the
semicolons?


Thanks a lot!


Timo



More information about the CMake mailing list