cmake: Simplify CommandExists method.
This commit is contained in:
parent
0f1f324b0d
commit
04b307b961
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue