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:
Brad King 2010-11-18 07:54:56 -05:00
parent da0a463f17
commit 5fe3ac86ee
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }