diff options
author | Brad King <brad.king@kitware.com> | 2010-11-18 12:54:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-11-18 12:54:56 (GMT) |
commit | 5fe3ac86ee1702d957621c2054507eed2c393c6f (patch) | |
tree | 9017f7ddb415e9e7d4c0520c3d35798c763a1e2c | |
parent | da0a463f17418d6f2c1846c48cc33caa6025095a (diff) | |
download | CMake-5fe3ac86ee1702d957621c2054507eed2c393c6f.zip CMake-5fe3ac86ee1702d957621c2054507eed2c393c6f.tar.gz CMake-5fe3ac86ee1702d957621c2054507eed2c393c6f.tar.bz2 |
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.
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 1cabed2..d53200c 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); } |