[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5180-gf2769c2

Stephen Kelly steveire at gmail.com
Sat Nov 16 10:29:35 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  f2769c2cf5ef5019bec4800b8b80c1b66e113d13 (commit)
       via  d2fb4a0c654ef1a620b5d1525befbf9a5259436a (commit)
      from  33afd1e09a396ab42bf4e5347739b7347e7dc5fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2769c2cf5ef5019bec4800b8b80c1b66e113d13
commit f2769c2cf5ef5019bec4800b8b80c1b66e113d13
Merge: 33afd1e d2fb4a0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Nov 16 10:29:32 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Nov 16 10:29:32 2013 -0500

    Merge topic 'cross-compiling-toolchain-variables' into next
    
    d2fb4a0 Revert "find_library: Find shared libraries with numerical suffixes"


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2fb4a0c654ef1a620b5d1525befbf9a5259436a
commit d2fb4a0c654ef1a620b5d1525befbf9a5259436a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Nov 16 16:24:18 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Nov 16 16:24:23 2013 +0100

    Revert "find_library: Find shared libraries with numerical suffixes"
    
    This reverts commit 2e3809314d09372a552c2d6e7b8e656960675957.
    
    The raspbian image I was testing with did not have the libgl1-mesa-dev
    package pre-installed. Installing that package adds the missing symlink.

diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 3684faf..de52df7 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -175,6 +175,9 @@ struct cmFindLibraryHelper
   typedef std::vector<std::string>::size_type size_type;
   std::string BestPath;
 
+  // Support for OpenBSD shared library naming: lib<name>.so.<major>.<minor>
+  bool OpenBSD;
+
   // Current names under consideration.
   struct Name
   {
@@ -221,6 +224,11 @@ cmFindLibraryHelper::cmFindLibraryHelper(cmMakefile* mf):
   cmSystemTools::ExpandListArgument(suffixes_list, this->Suffixes, true);
   this->RegexFromList(this->PrefixRegexStr, this->Prefixes);
   this->RegexFromList(this->SuffixRegexStr, this->Suffixes);
+
+  // Check whether to use OpenBSD-style library version comparisons.
+  this->OpenBSD =
+    this->Makefile->GetCMakeInstance()
+    ->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
 }
 
 //----------------------------------------------------------------------------
@@ -306,7 +314,10 @@ void cmFindLibraryHelper::AddName(std::string const& name)
   regex += this->PrefixRegexStr;
   this->RegexFromLiteral(regex, name);
   regex += this->SuffixRegexStr;
-  regex += "(\\.[0-9]+\\.[0-9]+)?";
+  if(this->OpenBSD)
+    {
+    regex += "(\\.[0-9]+\\.[0-9]+)?";
+    }
   regex += "$";
   entry.Regex.compile(regex.c_str());
   this->Names.push_back(entry);
@@ -375,15 +386,16 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
         {
         // This is a matching file.  Check if it is better than the
         // best name found so far.  Earlier prefixes are preferred,
-        // followed by earlier suffixes.  Shared library version extensions
-        // are also compared.
+        // followed by earlier suffixes.  For OpenBSD, shared library
+        // version extensions are compared.
         size_type prefix = this->GetPrefixIndex(name.Regex.match(1));
         size_type suffix = this->GetSuffixIndex(name.Regex.match(2));
         unsigned int major = 0;
         unsigned int minor = 0;
-
-        sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
-
+        if(this->OpenBSD)
+          {
+          sscanf(name.Regex.match(3).c_str(), ".%u.%u", &major, &minor);
+          }
         if(this->BestPath.empty() || prefix < bestPrefix ||
            (prefix == bestPrefix && suffix < bestSuffix) ||
            (prefix == bestPrefix && suffix == bestSuffix &&

-----------------------------------------------------------------------

Summary of changes:
 Source/cmFindLibraryCommand.cxx |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list