summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-21 20:53:41 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-02-21 20:53:41 (GMT)
commite1a6c9b9a1affb846d997fcf19dc90dbc79b60c1 (patch)
tree0350a5a076633c4bf025e8ab78dafd93048948bb /Source
parent27431d2886ea0062fa0a024d4472dd20e8a23ea1 (diff)
parentafc75bb7f520b7405a08f24a25a42542d3e3c92f (diff)
downloadCMake-e1a6c9b9a1affb846d997fcf19dc90dbc79b60c1.zip
CMake-e1a6c9b9a1affb846d997fcf19dc90dbc79b60c1.tar.gz
CMake-e1a6c9b9a1affb846d997fcf19dc90dbc79b60c1.tar.bz2
Merge topic 'link-OpenBSD-shared-libs-issue-12954'
afc75bb Recognize OpenBSD versioned .so names (#12954)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmComputeLinkInformation.cxx14
-rw-r--r--Source/cmComputeLinkInformation.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index edf6c35..57fd5b4 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -248,6 +248,10 @@ cmComputeLinkInformation
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
+ // Check whether to recognize OpenBSD-style library versioned names.
+ this->OpenBSD = this->Makefile->GetCMakeInstance()
+ ->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
+
// The configuration being linked.
this->Config = config;
@@ -973,7 +977,15 @@ cmComputeLinkInformation
}
// Finish the list.
- libext += ")$";
+ libext += ")";
+
+ // Add an optional OpenBSD version component.
+ if(this->OpenBSD)
+ {
+ libext += "(\\.[0-9]+\\.[0-9]+)?";
+ }
+
+ libext += "$";
return libext;
}
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index bbeed68..f60f8d3 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -128,6 +128,7 @@ private:
cmsys::RegularExpression ExtractSharedLibraryName;
cmsys::RegularExpression ExtractAnyLibraryName;
std::string SharedRegexString;
+ bool OpenBSD;
void AddLinkPrefix(const char* p);
void AddLinkExtension(const char* e, LinkType type);
std::string CreateExtensionRegex(std::vector<std::string> const& exts);