David Cole wrote:
This "works" with just cmake:
FILE(READ "${file}" contents)
# Convert file contents into a CMake list (where each element in the list
# is one line of the file)
#
STRING(REGEX REPLACE ";" "\\\\;" contents "${contents}")
STRING(REGEX REPLACE "\n" ";" contents "${contents}")
Brilliant! Thanks, that works wonderfully.
I hadn't even thought to transform the contents of the file into a list
by simply replacing the carriage returns.
The reason I say "works" (in quotes) is that there are two caveats
wherein it does not work:
Thanks for pointing out the caveats. I can live with both of them :)
--
Philip Lowman
Simulation Development Engineer, Modeling and Simulation Technology
General Dynamics Land Systems
http://www.gdls.com
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake