cmake: Simplify CommandExists method.

This commit is contained in:
Stephen Kelly 2015-04-11 12:33:27 +02:00
parent 0f1f324b0d
commit 04b307b961
1 changed files with 1 additions and 2 deletions

View File

@ -222,8 +222,7 @@ void cmake::CleanupCommandsAndMacros()
bool cmake::CommandExists(const std::string& name) const bool cmake::CommandExists(const std::string& name) const
{ {
std::string sName = cmSystemTools::LowerCase(name); return this->GetCommand(name) ? true : false;
return (this->Commands.find(sName) != this->Commands.end());
} }
cmCommand *cmake::GetCommand(const std::string& name) const cmCommand *cmake::GetCommand(const std::string& name) const