[Cmake-commits] CMake branch, next, updated. v2.8.9-119-g6da9e9a

Alexander Neundorf neundorf at kde.org
Thu Aug 16 17:04:08 EDT 2012


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  6da9e9ab53459b3efd9a3e2623a01558b40387e6 (commit)
       via  9110d0eab4ed3b024ad485eaaf15b1d7e4c38744 (commit)
       via  d97b38529efb22579216c406c104c49ea89ba617 (commit)
       via  c4306dc8057c45bc5edfd18465f85790800124cd (commit)
      from  9ae27d461399f6bed55d2fa13df0eea7cb2f88e1 (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=6da9e9ab53459b3efd9a3e2623a01558b40387e6
commit 6da9e9ab53459b3efd9a3e2623a01558b40387e6
Merge: 9ae27d4 9110d0e
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Thu Aug 16 17:04:07 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 16 17:04:07 2012 -0400

    Merge topic 'HandleMacFrameworkIncludeDirs_13465' into next
    
    9110d0e Eclipse on OSX: improve handling of framework include dirs (#13367)
    d97b385 Eclipse on OSX: fix handling of framework include dirs (#13464)
    c4306dc CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9110d0eab4ed3b024ad485eaaf15b1d7e4c38744
commit 9110d0eab4ed3b024ad485eaaf15b1d7e4c38744
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Aug 10 21:45:03 2012 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Aug 16 23:02:10 2012 +0200

    Eclipse on OSX: improve handling of framework include dirs (#13367)
    
    It seems that if cmake finds something like the following:
    /System/Library/Frameworks/GLUT.framework/Headers
    Eclipse doesn't like that and wants to have
    /System/Library/Frameworks
    instead
    
    Alex

diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 5c7d400..99ca375 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -610,6 +610,16 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
     if (!inc->empty())
       {
       std::string dir = cmSystemTools::CollapseFullPath(inc->c_str());
+
+      // handle framework include dirs on OSX, the remainder after the
+      // Frameworks/ part has to be stripped
+      //   /System/Library/Frameworks/GLUT.framework/Headers
+      cmsys::RegularExpression frameworkRegex("(.+/Frameworks)/.+\\.framework/");
+      if(frameworkRegex.find(dir.c_str()))
+        {
+        dir = frameworkRegex.match(1);
+        }
+
       if(emittedDirs.find(dir) == emittedDirs.end())
         {
         emittedDirs.insert(dir);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d97b38529efb22579216c406c104c49ea89ba617
commit d97b38529efb22579216c406c104c49ea89ba617
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Aug 10 21:28:40 2012 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Aug 16 23:02:10 2012 +0200

    Eclipse on OSX: fix handling of framework include dirs (#13464)
    
    On OSX, the output from gcc looks like this:
     /usr/include/c++/4.2.1
     /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
     /usr/include/c++/4.2.1/backward
     /usr/lib/gcc/i686-apple-darwin10/4.2.1/include
     /usr/include
     /System/Library/Frameworks (framework directory)
     /Library/Frameworks (framework directory)
    End of search list.
    
    The "(framework directory)" part needs to be removed so that Eclipse handles it properly
    
    Alex

diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 54a6418..1fa0157 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -42,7 +42,10 @@ macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
     # split the output into lines and then remove leading and trailing spaces from each of them:
     string(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
     foreach(nextLine ${_includeLines})
-      string(STRIP "${nextLine}" _includePath)
+      # on OSX, gcc says things like this:  "/System/Library/Frameworks (framework directory)", strip the last part
+      string(REGEX REPLACE "\\(framework directory\\)" "" nextLineNoFramework "${nextLine}")
+      # strip spaces at the beginning and the end
+      string(STRIP "${nextLineNoFramework}" _includePath)
       list(APPEND ${_resultIncludeDirs} "${_includePath}")
     endforeach()
 

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

Summary of changes:
 ...atorDetermineCompilerMacrosAndIncludeDirs.cmake |    5 ++++-
 Source/CMakeVersion.cmake                          |    2 +-
 Source/cmExtraEclipseCDT4Generator.cxx             |   10 ++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list