mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 14:40:48 +08:00
cmake: Simplify CommandExists method.
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user