Kris Dekeyser wrote:
I'm pretty sure something changed in the the interpretation of variables. I attached a simple CMakeLists.txt file that shows the difference along with a configuration file to read in.
Yes, this did change, but the original behavior was not intended or documented. Note the documentation of the FILE(READ) option from 2.0:
READ will read the content of a file and store it into the variable. This says nothing about replacing variables. The change was a bug fix.
In Cmake 2.0.6 it runs fine. In Cmake 2.4.2 it fails when reading the configuration file. The backslashes in the last line need to be escaped. Also, in the first line the ${...} string is not replace with the variable's contents. That's what causes the test to fail. Note that the CMakeLists.txt program copies each word in ${line} into a WordList variable. It's pretty useless in the test program, but in our configuration it actually filters out some important keywords. If I skip that step in the test program, the test fails with Cmake 2.0.6, so I asume that the variable interpretation was done in that step in the older Cmake. Is there a way in Cmake 2.0.4 to force the interpretation of variables in strings?
STRING(CONFIGURE ...) -Brad _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake