mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 00:58:59 -05:00
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:
@@ -923,7 +923,7 @@ void cmComputeLinkInformation::ComputeItemParserInfo()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmComputeLinkInformation::AddLinkPrefix(const char* p)
|
void cmComputeLinkInformation::AddLinkPrefix(const char* p)
|
||||||
{
|
{
|
||||||
if(p)
|
if(p && *p)
|
||||||
{
|
{
|
||||||
this->LinkPrefixes.insert(p);
|
this->LinkPrefixes.insert(p);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user