summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-09-20 19:08:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-09-20 19:08:30 (GMT)
commitbaa28efd107a3efa821034a64a1c737d3c58ad89 (patch)
tree37ea066736ad3ccf45c83e39894526bc817e1e71 /Source/cmMakefile.cxx
parentb9d56e8497b26485d6ea56fa5b781f24260f2038 (diff)
downloadCMake-baa28efd107a3efa821034a64a1c737d3c58ad89.zip
CMake-baa28efd107a3efa821034a64a1c737d3c58ad89.tar.gz
CMake-baa28efd107a3efa821034a64a1c737d3c58ad89.tar.bz2
ENH: change InitialPass to take a const reference to the argument string, to avoid changes to the file cache
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d58f72d..f3e777e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -217,7 +217,7 @@ void cmMakefile::Print() const
void cmMakefile::ExecuteCommand(std::string &name,
- std::vector<std::string> &arguments)
+ std::vector<std::string> const& arguments)
{
RegisteredCommandsMap::iterator pos = m_Commands.find(name);
if(pos != m_Commands.end())
@@ -336,16 +336,14 @@ 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,
- argumentsCopy);
+ curFunction.m_Arguments);
}
}
@@ -1149,7 +1147,7 @@ cmMakefile::FindSourceGroup(const char* source,
bool cmMakefile::IsFunctionBlocked(const char *name,
- std::vector<std::string> &args)
+ std::vector<std::string> const&args)
{
// loop over all function blockers to see if any block this command
std::set<cmFunctionBlocker *>::const_iterator pos;