Browse Source

BUG: make a copy of the arguments before passing them to Execute

Ken Martin 24 years ago
parent
commit
b9d56e8497
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/cmMakefile.cxx

+ 3 - 1
Source/cmMakefile.cxx

@@ -336,14 +336,16 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external)
   // add this list file to the list of dependencies
   m_ListFiles.push_back( filenametoread);
   const int numberFunctions = lf->m_Functions.size();
+  std::vector<std::string> argumentsCopy;
   for(int i =0; i < numberFunctions; ++i)
     {
     cmListFileFunction& curFunction = lf->m_Functions[i];
     if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(),
                                 curFunction.m_Arguments))
       {
+      argumentsCopy = curFunction.m_Arguments;
       this->ExecuteCommand(curFunction.m_Name,
-                           curFunction.m_Arguments);
+                           argumentsCopy);
       }
     }