summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-24 13:56:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-05-24 13:56:23 (GMT)
commit2f8230b05251aa498b47a883d471b1ebfd357e64 (patch)
treef09df6274eeb236f62b6a0bdd9a389c926c10bea /Source/cmState.cxx
parent2eb9852d7b74c45aa30c8a5db7e8469bad1eecd4 (diff)
parentb1a05d6c762ceb6dbf47126a7ddcedadb45e02f5 (diff)
downloadCMake-2f8230b05251aa498b47a883d471b1ebfd357e64.zip
CMake-2f8230b05251aa498b47a883d471b1ebfd357e64.tar.gz
CMake-2f8230b05251aa498b47a883d471b1ebfd357e64.tar.bz2
Merge topic 'revise-case-insensitive-command'
b1a05d6c76 Revise implementation of case-insensitive command names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2024
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index a93fb11..a57be4d 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -462,13 +462,17 @@ void cmState::AddScriptedCommand(std::string const& name, cmCommand* command)
cmCommand* cmState::GetCommand(std::string const& name) const
{
- std::string sName = cmSystemTools::LowerCase(name);
+ return GetCommandByExactName(cmSystemTools::LowerCase(name));
+}
+
+cmCommand* cmState::GetCommandByExactName(std::string const& name) const
+{
std::map<std::string, cmCommand*>::const_iterator pos;
- pos = this->ScriptedCommands.find(sName);
+ pos = this->ScriptedCommands.find(name);
if (pos != this->ScriptedCommands.end()) {
return pos->second;
}
- pos = this->BuiltinCommands.find(sName);
+ pos = this->BuiltinCommands.find(name);
if (pos != this->BuiltinCommands.end()) {
return pos->second;
}