Merge topic 'cmConditionEvaluator-minor-cleanup'

e7d5c142 cmConditionEvaluator: Remove superfluous spaces in expressions
This commit is contained in:
Brad King 2015-07-28 10:08:48 -04:00 committed by CMake Topic Stage
commit 16dffb3136
1 changed files with 8 additions and 8 deletions

View File

@ -299,11 +299,11 @@ void cmConditionEvaluator::IncrementArguments(cmArgumentList &newArgs,
cmArgumentList::iterator &argP1, cmArgumentList::iterator &argP1,
cmArgumentList::iterator &argP2) const cmArgumentList::iterator &argP2) const
{ {
if (argP1 != newArgs.end()) if (argP1 != newArgs.end())
{ {
argP1++; argP1++;
argP2 = argP1; argP2 = argP1;
if (argP1 != newArgs.end()) if (argP1 != newArgs.end())
{ {
argP2++; argP2++;
} }
@ -442,35 +442,35 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList &newArgs,
argP1 = arg; argP1 = arg;
this->IncrementArguments(newArgs,argP1,argP2); this->IncrementArguments(newArgs,argP1,argP2);
// does a file exist // does a file exist
if (this->IsKeyword("EXISTS", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("EXISTS", *arg) && argP1 != newArgs.end())
{ {
this->HandlePredicate( this->HandlePredicate(
cmSystemTools::FileExists(argP1->c_str()), cmSystemTools::FileExists(argP1->c_str()),
reducible, arg, newArgs, argP1, argP2); reducible, arg, newArgs, argP1, argP2);
} }
// does a directory with this name exist // does a directory with this name exist
if (this->IsKeyword("IS_DIRECTORY", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("IS_DIRECTORY", *arg) && argP1 != newArgs.end())
{ {
this->HandlePredicate( this->HandlePredicate(
cmSystemTools::FileIsDirectory(argP1->c_str()), cmSystemTools::FileIsDirectory(argP1->c_str()),
reducible, arg, newArgs, argP1, argP2); reducible, arg, newArgs, argP1, argP2);
} }
// does a symlink with this name exist // does a symlink with this name exist
if (this->IsKeyword("IS_SYMLINK", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("IS_SYMLINK", *arg) && argP1 != newArgs.end())
{ {
this->HandlePredicate( this->HandlePredicate(
cmSystemTools::FileIsSymlink(argP1->c_str()), cmSystemTools::FileIsSymlink(argP1->c_str()),
reducible, arg, newArgs, argP1, argP2); reducible, arg, newArgs, argP1, argP2);
} }
// is the given path an absolute path ? // is the given path an absolute path ?
if (this->IsKeyword("IS_ABSOLUTE", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("IS_ABSOLUTE", *arg) && argP1 != newArgs.end())
{ {
this->HandlePredicate( this->HandlePredicate(
cmSystemTools::FileIsFullPath(argP1->c_str()), cmSystemTools::FileIsFullPath(argP1->c_str()),
reducible, arg, newArgs, argP1, argP2); reducible, arg, newArgs, argP1, argP2);
} }
// does a command exist // does a command exist
if (this->IsKeyword("COMMAND", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("COMMAND", *arg) && argP1 != newArgs.end())
{ {
cmCommand* command = cmCommand* command =
this->Makefile.GetState()->GetCommand(argP1->c_str()); this->Makefile.GetState()->GetCommand(argP1->c_str());
@ -494,7 +494,7 @@ bool cmConditionEvaluator::HandleLevel1(cmArgumentList &newArgs,
reducible, arg, newArgs, argP1, argP2); reducible, arg, newArgs, argP1, argP2);
} }
// is a variable defined // is a variable defined
if (this->IsKeyword("DEFINED", *arg) && argP1 != newArgs.end()) if (this->IsKeyword("DEFINED", *arg) && argP1 != newArgs.end())
{ {
size_t argP1len = argP1->GetValue().size(); size_t argP1len = argP1->GetValue().size();
bool bdef = false; bool bdef = false;