From 5fe3ac86ee1702d957621c2054507eed2c393c6f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 Nov 2010 07:54:56 -0500 Subject: [PATCH] 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. --- Source/cmComputeLinkInformation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 1cabed2c5..d53200c87 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -923,7 +923,7 @@ void cmComputeLinkInformation::ComputeItemParserInfo() //---------------------------------------------------------------------------- void cmComputeLinkInformation::AddLinkPrefix(const char* p) { - if(p) + if(p && *p) { this->LinkPrefixes.insert(p); }