[cmake-commits] martink committed cmFunctionCommand.cxx 1.2 1.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Dec 20 10:05:10 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8573
Modified Files:
cmFunctionCommand.cxx
Log Message:
BUG: fix issue with CMAKE_CURENT_LIST_FILE reporting in funcitons
Index: cmFunctionCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFunctionCommand.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmFunctionCommand.cxx 4 Dec 2007 15:43:32 -0000 1.2
+++ cmFunctionCommand.cxx 20 Dec 2007 15:05:08 -0000 1.3
@@ -150,8 +150,6 @@
this->Makefile->AddDefinition("ARGN", argnDef.c_str());
// Invoke all the functions that were collected in the block.
- cmListFileFunction newLFF;
-
// for each function
for(unsigned int c = 0; c < this->Functions.size(); ++c)
{
@@ -203,6 +201,18 @@
cmFunctionHelperCommand *f = new cmFunctionHelperCommand();
f->Args = this->Args;
f->Functions = this->Functions;
+
+ // Set the FilePath on the arguments to match the function since it is
+ // not stored and the original values may be freed
+ for (unsigned int i = 0; i < f->Functions.size(); ++i)
+ {
+ for (unsigned int j = 0; j < f->Functions[i].Arguments.size(); ++j)
+ {
+ f->Functions[i].Arguments[j].FilePath =
+ f->Functions[i].FilePath.c_str();
+ }
+ }
+
std::string newName = "_" + this->Args[0];
mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(),
newName.c_str());
More information about the Cmake-commits
mailing list