ENH: expand variables in arguments before the commands get them

This commit is contained in:
Bill Hoffman
2002-03-05 18:41:24 -05:00
parent 2b9140f6b5
commit 4651dbcfc6
37 changed files with 44 additions and 138 deletions

View File

@@ -18,15 +18,13 @@
// cmIncludeCommand
bool cmIncludeCommand::InitialPass(std::vector<std::string> const& argsIn)
bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args)
{
if (argsIn.size()< 1 || argsIn.size() > 2)
if (args.size()< 1 || args.size() > 2)
{
this->SetError("called with wrong number of arguments. "
"Include only takes one file.");
}
std::vector<std::string> args = argsIn;
m_Makefile->ExpandVariablesInString( args[0]);
bool exists = cmSystemTools::FileExists(args[0].c_str());
if(args.size() == 2 && args[1] == "OPTIONAL" && !exists)
{