[Cmake-commits] CMake branch, next, updated. v3.7.2-2276-gbb234a4

Brad King brad.king at kitware.com
Fri Jan 20 16:30:54 EST 2017


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  bb234a4b50ecca06c00ab4f4cebdd44261f25653 (commit)
       via  1ee0ffab819d632d7570bee23a83807facbb45a2 (commit)
       via  1806e011cb2608c7ef62f345661dd35a899eb81c (commit)
      from  1fe432a4a94ef20f8fad1b516a04541ba00e2610 (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=bb234a4b50ecca06c00ab4f4cebdd44261f25653
commit bb234a4b50ecca06c00ab4f4cebdd44261f25653
Merge: 1fe432a 1ee0ffa
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 20 16:30:53 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 20 16:30:53 2017 -0500

    Merge topic 'android-include-api' into next
    
    1ee0ffab Android: Pass sysroot include directory explicitly
    1806e011 Android: Fix c++_{static,shared} support include directory order


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ee0ffab819d632d7570bee23a83807facbb45a2
commit 1ee0ffab819d632d7570bee23a83807facbb45a2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 20 15:45:09 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 20 15:45:09 2017 -0500

    Android: Pass sysroot include directory explicitly
    
    The NDK's `build/core/definitions.mk` file adds compiler flags:
    
        -isystem $$(call host-path,$$(SYSROOT_INC)/usr/include)
    
    This passes the system include directory explicitly even though it is
    implied by `--sysroot=`.  The explicit flag places the directory
    earlier in the include path than the sysroot-default one would be.
    
    Teach CMake to add this include directory at the end of the standard
    include path for Android.  Otherwise the toolchain's `include-fixed/`
    directory may replace system headers with "fixed" copies that are not
    from the same API version.
    
    Closes: #16536

diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index 8755d4f..cf2785a 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -149,4 +149,13 @@ macro(__android_compiler_common lang)
   if("x${lang}" STREQUAL "xCXX")
     __android_stl(CXX)
   endif()
+
+  # <ndk>/build/core/definitions.mk appends the sysroot's include directory
+  # explicitly at the end of the command-line include path so that it
+  # precedes the toolchain's builtin include directories.  This is
+  # necessary so that Android API-version-specific headers are preferred
+  # over those in the toolchain's `include-fixed` directory (which cannot
+  # possibly match all versions).
+  list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include")
+  list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include")
 endmacro()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1806e011cb2608c7ef62f345661dd35a899eb81c
commit 1806e011cb2608c7ef62f345661dd35a899eb81c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 20 15:39:27 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 20 15:39:27 2017 -0500

    Android: Fix c++_{static,shared} support include directory order
    
    The NDK's own build files:
    
        <ndk>/build/tools/build-cxx-stl.sh
        <ndk>/build/cmake/android.toolchain.cmake
    
    for the `c++_static` and `c++_shared` build types add the
    `<ndk>/sources/android/support/include` include directory
    between the two `<ndk>/sources/cxx-stl/llvm-libc++*` directories.
    Re-order our own include directory generation to match.
    
    Issue: #16536

diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake
index b27015d..a12411c 100644
--- a/Modules/Platform/Android/ndk-stl-c++.cmake
+++ b/Modules/Platform/Android/ndk-stl-c++.cmake
@@ -6,16 +6,15 @@ macro(__android_stl_cxx lang filename)
   if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
     # r12 and below
     __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1)
+    __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
     __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1)
   else()
     # r13 and above
     __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1)
+    __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
     __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1)
   endif()
 
-  # Add a secondary include directory if it exists.
-  __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
-
   # Add the library file.
   __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1)
 endmacro()

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

Summary of changes:
 Modules/Platform/Android-Common.cmake      |    9 +++++++++
 Modules/Platform/Android/ndk-stl-c++.cmake |    5 ++---
 2 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list