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  f96cd09de6efbf13d9662eb99fe5911c36fd0ebb (commit)
       via  88f07fb417a25f98662da2abf09a9db03f48eb7f (commit)
      from  4c3b6121f4cd46550db6f2e00359b779ba54735e (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f96cd09de6efbf13d9662eb99fe5911c36fd0ebb
commit f96cd09de6efbf13d9662eb99fe5911c36fd0ebb
Merge: 4c3b612 88f07fb
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Tue Dec 27 16:25:18 2016 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Dec 27 16:25:18 2016 -0500

    Merge topic '15687-revisit-xcode-system-include' into next
    
    88f07fb4 Xcode: Properly mark SYSTEM includes as such


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88f07fb417a25f98662da2abf09a9db03f48eb7f
commit 88f07fb417a25f98662da2abf09a9db03f48eb7f
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Tue Dec 27 22:18:30 2016 +0100
Commit:     Gregor Jasny <gja...@googlemail.com>
CommitDate: Tue Dec 27 22:18:30 2016 +0100

    Xcode: Properly mark SYSTEM includes as such
    
    We now populate the per-language flags in addition to the header
    search paths stored in HEADER_SEARCH_PATHS. This preserves include
    paths for GNU assembly files (cmake/cmake#16449) and also provides
    SYSTEM include semantics.
    
    Closes: cmake/cmake#15687

diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index 736aa91..96535eb 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1977,6 +1977,22 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
     buildSettings->AddAttribute("HEADER_SEARCH_PATHS", dirs.CreateList());
   }
 
+  if (this->XcodeVersion >= 60) {
+    // Add those per-language flags in addition to HEADER_SEARCH_PATHS to gain
+    // system include directory awareness. We need to also keep on setting
+    // HEADER_SEARCH_PATHS to work around a missing compile options flag for
+    // GNU assembly files (#16449)
+    for (std::set<std::string>::iterator li = languages.begin();
+         li != languages.end(); ++li) {
+      std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags(
+        includes, gtgt, *li, true, false, configName);
+
+      if (!includeFlags.empty()) {
+        cflags[*li] += " " + includeFlags;
+      }
+    }
+  }
+
   bool same_gflags = true;
   std::map<std::string, std::string> gflags;
   std::string const* last_gflag = 0;
diff --git a/Tests/IncludeDirectories/CMakeLists.txt 
b/Tests/IncludeDirectories/CMakeLists.txt
index 4920582..db18462 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -3,7 +3,9 @@ project(IncludeDirectories)
 
 if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION 
VERSION_GREATER 4.4)
     OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL 
AppleClang)
-    AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL 
"Ninja"))
+    AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles"
+      OR CMAKE_GENERATOR STREQUAL "Ninja"
+      OR (CMAKE_GENERATOR STREQUAL "Xcode" AND NOT XCODE_VERSION VERSION_LESS 
6.0)))
   include(CheckCXXCompilerFlag)
   check_cxx_compiler_flag(-Wunused-variable run_sys_includes_test)
   if(run_sys_includes_test)
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt 
b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
index dcee85e..5078f30 100644
--- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt
@@ -15,10 +15,17 @@ target_include_directories(upstream SYSTEM PUBLIC
 )
 
 add_library(config_specific INTERFACE)
-set(testConfig ${CMAKE_BUILD_TYPE})
-target_include_directories(config_specific SYSTEM INTERFACE
-  "$<$<CONFIG:${testConfig}>:${CMAKE_CURRENT_SOURCE_DIR}/config_specific>"
-)
+if(CMAKE_GENERATOR STREQUAL "Xcode")
+  # CMAKE_BUILD_TYPE does not work here for multi-config generators
+  target_include_directories(config_specific SYSTEM INTERFACE
+    "${CMAKE_CURRENT_SOURCE_DIR}/config_specific"
+  )
+else()
+  set(testConfig ${CMAKE_BUILD_TYPE})
+  target_include_directories(config_specific SYSTEM INTERFACE
+    "$<$<CONFIG:${testConfig}>:${CMAKE_CURRENT_SOURCE_DIR}/config_specific>"
+  )
+endif()
 
 add_library(consumer consumer.cpp)
 target_link_libraries(consumer upstream config_specific)

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx                      |   16 ++++++++++++++++
 Tests/IncludeDirectories/CMakeLists.txt                |    4 +++-
 .../SystemIncludeDirectories/CMakeLists.txt            |   15 +++++++++++----
 3 files changed, 30 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to