mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 22:31:18 -05:00
cmState: Avoid lowering command name twice
The given command given to GetCommand is already lower case so we can use GetCommandByExactName directly.
This commit is contained in:
+1
-1
@@ -503,7 +503,7 @@ void cmState::AddScriptedCommand(std::string const& name, Command command)
|
|||||||
std::string sName = cmSystemTools::LowerCase(name);
|
std::string sName = cmSystemTools::LowerCase(name);
|
||||||
|
|
||||||
// if the command already exists, give a new name to the old command.
|
// if the command already exists, give a new name to the old command.
|
||||||
if (Command oldCmd = this->GetCommand(sName)) {
|
if (Command oldCmd = this->GetCommandByExactName(sName)) {
|
||||||
this->ScriptedCommands["_" + sName] = oldCmd;
|
this->ScriptedCommands["_" + sName] = oldCmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user