[CMake] Possible Configure_File bug

William A. Hoffman billlist at nycap.rr.com
Tue Jun 6 09:41:23 EDT 2006


At 02:51 PM 6/5/2006, Michael Bell wrote:
>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

It is a bug, that was introduced over a year ago.

I have checked in a fix:

$ cvs commit -m "ENH: fix for replacement of @var @ only legal variable names s
hould be replaced" cmMakefile.cxx
Checking for path: /cvsroot/CMake/CMake/Source
Unrestricted user: hoffman
/cvsroot/CMake/CMake/Source/cmMakefile.cxx,v  <--  cmMakefile.cxx
new revision: 1.341; previous revision: 1.340

It will be in 2.4.3.

-Bill



More information about the CMake mailing list