[Cmake-commits] CMake branch, next, updated. v3.2.2-2206-g37da4f8

Brad King brad.king at kitware.com
Mon Apr 27 11:50:17 EDT 2015


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  37da4f82065020834d31588bb1b373ef77e2f5b8 (commit)
       via  c46490dad525e5f5e10eba12808718340ad40ace (commit)
      from  1a66455db39eb57c3d53d1293f8fe80df06e4faf (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=37da4f82065020834d31588bb1b373ef77e2f5b8
commit 37da4f82065020834d31588bb1b373ef77e2f5b8
Merge: 1a66455 c46490d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 27 11:50:16 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Apr 27 11:50:16 2015 -0400

    Merge topic 'fix-osx-framework-detection' into next
    
    c46490da cmSystemTools: Fix IsPathToFramework implementation (#15535)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c46490dad525e5f5e10eba12808718340ad40ace
commit c46490dad525e5f5e10eba12808718340ad40ace
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Apr 27 11:45:49 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Apr 27 11:49:29 2015 -0400

    cmSystemTools: Fix IsPathToFramework implementation (#15535)
    
    Use more reliable logic to detect if a path ends in ".framework".  The
    old logic added by commit v2.4.0~791 (add better support for framework
    linking, 2005-12-26) did not account for paths not ending in it at all.
    With a 9-character path the logic and "npos == -1" happens to make the
    old check pass.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0e0532d..e2adabe 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1486,15 +1486,8 @@ void cmSystemTools::EnableVSConsoleOutput()
 
 bool cmSystemTools::IsPathToFramework(const char* path)
 {
-  if(cmSystemTools::FileIsFullPath(path))
-    {
-    std::string libname = path;
-    if(libname.find(".framework") == libname.size()+1-sizeof(".framework"))
-      {
-      return true;
-      }
-    }
-  return false;
+  return (cmSystemTools::FileIsFullPath(path) &&
+          cmHasLiteralSuffix(path, ".framework"));
 }
 
 bool cmSystemTools::CreateTar(const char* outFileName,

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

Summary of changes:
 Source/cmSystemTools.cxx |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list