BUG: Do not recompute link interfaces
The config-to-interface map in cmTarget should use case-insensitive configuration names. The change avoids repeating work if the given configuration has a different case than one already computed.
This commit is contained in:
parent
afbd595e85
commit
2247aca9cf
|
@ -3696,8 +3696,9 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup any existing link interface for this configuration.
|
// Lookup any existing link interface for this configuration.
|
||||||
|
std::string key = cmSystemTools::UpperCase(config? config : "");
|
||||||
cmTargetInternals::LinkInterfaceMapType::iterator
|
cmTargetInternals::LinkInterfaceMapType::iterator
|
||||||
i = this->Internal->LinkInterfaceMap.find(config?config:"");
|
i = this->Internal->LinkInterfaceMap.find(key);
|
||||||
if(i == this->Internal->LinkInterfaceMap.end())
|
if(i == this->Internal->LinkInterfaceMap.end())
|
||||||
{
|
{
|
||||||
// Compute the link interface for this configuration.
|
// Compute the link interface for this configuration.
|
||||||
|
@ -3705,8 +3706,7 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config)
|
||||||
iface.Exists = this->ComputeLinkInterface(config, iface);
|
iface.Exists = this->ComputeLinkInterface(config, iface);
|
||||||
|
|
||||||
// Store the information for this configuration.
|
// Store the information for this configuration.
|
||||||
cmTargetInternals::LinkInterfaceMapType::value_type
|
cmTargetInternals::LinkInterfaceMapType::value_type entry(key, iface);
|
||||||
entry(config?config:"", iface);
|
|
||||||
i = this->Internal->LinkInterfaceMap.insert(entry).first;
|
i = this->Internal->LinkInterfaceMap.insert(entry).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue