[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2767-gafaf3a0

Brad King brad.king at kitware.com
Mon May 5 15:52:04 EDT 2014


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  afaf3a09711691fe44d73cfc0a09c466a19d2319 (commit)
       via  255b408c9e295977fab7eb977087c498511b0a2a (commit)
      from  e4cec4d8cd6556c7e9ffbd13c2a15b1884c5da2e (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=afaf3a09711691fe44d73cfc0a09c466a19d2319
commit afaf3a09711691fe44d73cfc0a09c466a19d2319
Merge: e4cec4d 255b408
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon May 5 15:52:03 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 5 15:52:03 2014 -0400

    Merge topic 'osx-iframework' into next
    
    255b408c OS X: Use -iframework for system framework directories


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=255b408c9e295977fab7eb977087c498511b0a2a
commit 255b408c9e295977fab7eb977087c498511b0a2a
Author:     Mikołaj Siedlarek <msiedlarek at nctz.net>
AuthorDate: Mon May 5 12:39:55 2014 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon May 5 14:08:33 2014 -0400

    OS X: Use -iframework for system framework directories
    
    Just like -I flag has its -isystem counterpart which marks an include
    directory as a system directory and prevents unwanted warnings, on Apple
    systems there is -iframework -- a system directory replacement for -F.
    Use this flag to implement include_directories(SYSTEM) for frameworks.

diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index 528873c..13d2232 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -24,4 +24,5 @@ macro(__darwin_compiler_clang lang)
   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
   set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
   set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
+  set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG -iframework)
 endmacro()
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index 5fee7e3..9961e91 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -23,6 +23,10 @@ macro(__darwin_compiler_gnu lang)
   # GNU does not have -shared on OS X
   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+
+  if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.3)
+    set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG -iframework)
+  endif()
 endmacro()
 
 macro(cmake_gnu_set_sysroot_flag lang)
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f375b5f..c4c6428 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1344,6 +1344,12 @@ std::string cmLocalGenerator::GetIncludeFlags(
   const char* fwSearchFlag =
     this->Makefile->GetDefinition(fwSearchFlagVar);
 
+  std::string sysFwSearchFlagVar = "CMAKE_";
+  sysFwSearchFlagVar += lang;
+  sysFwSearchFlagVar += "_SYSTEM_FRAMEWORK_SEARCH_FLAG";
+  const char* sysFwSearchFlag =
+    this->Makefile->GetDefinition(sysFwSearchFlagVar);
+
   bool flagUsed = false;
   std::set<std::string> emitted;
 #ifdef __APPLE__
@@ -1360,9 +1366,17 @@ std::string cmLocalGenerator::GetIncludeFlags(
       frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
       if(emitted.insert(frameworkDir).second)
         {
-        includeFlags
-          << fwSearchFlag << this->Convert(frameworkDir,
-                                           START_OUTPUT, shellFormat, true)
+        if (sysFwSearchFlag && target &&
+            target->IsSystemIncludeDirectory(*i, config))
+          {
+          includeFlags << sysFwSearchFlag;
+          }
+        else
+          {
+          includeFlags << fwSearchFlag;
+          }
+        includeFlags << this->Convert(frameworkDir, START_OUTPUT,
+                                      shellFormat, true)
           << " ";
         }
       continue;

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

Summary of changes:
 Modules/Platform/Darwin-Clang.cmake |    1 +
 Modules/Platform/Darwin-GNU.cmake   |    4 ++++
 Source/cmLocalGenerator.cxx         |   20 +++++++++++++++++---
 3 files changed, 22 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list