[CMake] Possible Configure_File bug
Michael Bell
michael.bell at acm.org
Mon Jun 5 14:51:40 EDT 2006
Hi,
I use cmake with perl to help me manage directories. A perl script
might have something like this:
my $installdir = "@EXECUTABLE_OUTPUT_PATH@";
The CMakeLists.txt file would use CONFIGURE_FILE to set the path automatically:
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}
${EXECUTABLE_OUTPUT_PATH}/../${file}
@ONLY)
result:
my $installdir = "/home/myhome/bin";
This worked great until I upgraded to cmake version 2.4-patch 2 this
week (I was previously using 1.8). Now, stuff is being replaced that
shouldn't be. For example:
my @arr1 = @arr2;
is being replaced, and becomes:
my _arr2; ( @.*@ => _ )
In other words, whitespace used to prevent variable replacement (as I
think it should), and now it does not.
What is the correct behavior? Do you have any suggestions for working
around this problem for a system with thousands of perl scripts which
are now affected? (I can't deal with each file by hand).
I apologize if this issue has been addressed. I was not able to find
anything related in the archives or the bug list.
Thanks for your help,
michael
--
michael.bell at acm.org
More information about the CMake
mailing list