diff options
author | Brad King <brad.king@kitware.com> | 2012-02-13 15:33:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-13 15:34:41 (GMT) |
commit | afc75bb7f520b7405a08f24a25a42542d3e3c92f (patch) | |
tree | ce1375584d41b690a8dce278e0deef4ed526535c /Source/cmComputeLinkInformation.cxx | |
parent | 16b1a6e4e07b223c7ead20cd40346fc327e90569 (diff) | |
download | CMake-afc75bb7f520b7405a08f24a25a42542d3e3c92f.zip CMake-afc75bb7f520b7405a08f24a25a42542d3e3c92f.tar.gz CMake-afc75bb7f520b7405a08f24a25a42542d3e3c92f.tar.bz2 |
Recognize OpenBSD versioned .so names (#12954)
OpenBSD shared library names end in a ".#.#" version number suffix.
Teach cmComputeLinkInformation to tolerate the extra suffix after
the normal library name suffixes when parsing library names.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 14 |
1 files changed, 13 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; } |