summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-15 15:35:50 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-15 15:35:50 (GMT)
commite01e40cb87f464dd5b1d5ca1c8f0884f573c1b72 (patch)
treeba9e81d7f444edd01d559e0b2499602b80b38c4d /Source
parenta17aff74c7a571657414a0b82e431bbefbbb857b (diff)
downloadCMake-e01e40cb87f464dd5b1d5ca1c8f0884f573c1b72.zip
CMake-e01e40cb87f464dd5b1d5ca1c8f0884f573c1b72.tar.gz
CMake-e01e40cb87f464dd5b1d5ca1c8f0884f573c1b72.tar.bz2
Mark ARGC, ARGV*, and ARGN as used
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFunctionCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index b05642e..b226574 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -112,15 +112,19 @@ bool cmFunctionHelperCommand::InvokeInitialPass
// set the value of argc
cmOStringStream strStream;
strStream << expandedArgs.size();
+ this->Makefile->MarkVariableAsUsed("ARGC");
this->Makefile->AddDefinition("ARGC",strStream.str().c_str());
+ this->Makefile->MarkVariableAsUsed("ARGC");
// set the values for ARGV0 ARGV1 ...
for (unsigned int t = 0; t < expandedArgs.size(); ++t)
{
cmOStringStream tmpStream;
tmpStream << "ARGV" << t;
+ this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
this->Makefile->AddDefinition(tmpStream.str().c_str(),
expandedArgs[t].c_str());
+ this->Makefile->MarkVariableAsUsed(tmpStream.str().c_str());
}
// define the formal arguments
@@ -152,8 +156,12 @@ bool cmFunctionHelperCommand::InvokeInitialPass
}
cnt ++;
}
+ this->Makefile->MarkVariableAsUsed("ARGV");
this->Makefile->AddDefinition("ARGV", argvDef.c_str());
+ this->Makefile->MarkVariableAsUsed("ARGV");
+ this->Makefile->MarkVariableAsUsed("ARGN");
this->Makefile->AddDefinition("ARGN", argnDef.c_str());
+ this->Makefile->MarkVariableAsUsed("ARGN");
// Invoke all the functions that were collected in the block.
// for each function