This is something that would make my life a lot easier too.

Here's my use-case: I need to configure a file with a variable number of nearly-identical blocks of text. I would love to read in the "master text" with FILE(READ...), and then modify that text with STRING(CONFIGURE...) several times with different variables. I would then concatenate these strings together and write then out with a CONFIGURE_FILE or FILE(WRITE...) step.

Right now, I've got no good way to put multiple blocks of text in the same file, without having that text actually hard-coded in a CMake file, which is messy.

Zach


On Jan 26, 2006, at 7:48 AM, Brad King wrote:

wedekind wrote:
you are generally right. But we have different build-processes for the same
source-code at work. That means I cannot introduce this variable in the source code for everyone, this would break the non-cmake builds. Using CMake to insert this variable and run CONFIGURE_FILE afterwards results in missing
semicolons too.
I have used a perl script now which runs as a PRE_BUILD-script and modifies the source code. It's a workaround that is pretty for me, but it would be
nice if this IMHO faulty behaviour of CMake could be fixed.

Please put a bug report here:

http://www.cmake.org

Thanks,
-Brad
_______________________________________________
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