Prefer non-empty prefixes when matching lib names (#11468)
In cmComputeLinkInformation we match library names with a regular expression, possibly extracting the 'lib' prefix. The regex component to match the prefix always allows an empty prefix to be matched, as in "(lib|)". Avoid every adding an empty prefix option earlier in the regex, as in "(|lib|)", because it will be preferred and 'lib' will never match.
This commit is contained in:
parent
da0a463f17
commit
5fe3ac86ee
|
@ -923,7 +923,7 @@ void cmComputeLinkInformation::ComputeItemParserInfo()
|
|||
//----------------------------------------------------------------------------
|
||||
void cmComputeLinkInformation::AddLinkPrefix(const char* p)
|
||||
{
|
||||
if(p)
|
||||
if(p && *p)
|
||||
{
|
||||
this->LinkPrefixes.insert(p);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue