cmGetDirectoryPropertyCommand: Move variable to the point of use.

This commit is contained in:
Stephen Kelly 2015-06-08 22:03:07 +02:00
parent 8fc53c3ce8
commit fe603c7dfb
1 changed files with 1 additions and 2 deletions

View File

@ -26,7 +26,6 @@ bool cmGetDirectoryPropertyCommand
std::vector<std::string>::const_iterator i = args.begin(); std::vector<std::string>::const_iterator i = args.begin();
std::string variable = *i; std::string variable = *i;
++i; ++i;
std::string output = "";
// get the directory argument if there is one // get the directory argument if there is one
cmMakefile *dir = this->Makefile; cmMakefile *dir = this->Makefile;
@ -79,7 +78,7 @@ bool cmGetDirectoryPropertyCommand
"providing the name of the variable to get."); "providing the name of the variable to get.");
return false; return false;
} }
output = dir->GetSafeDefinition(*i); std::string output = dir->GetSafeDefinition(*i);
this->Makefile->AddDefinition(variable, output.c_str()); this->Makefile->AddDefinition(variable, output.c_str());
return true; return true;
} }