summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-07 13:10:49 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-07 13:10:49 (GMT)
commit9e7f9bbf56b5d9201da0cc5b360555101c6c6a36 (patch)
treec6dde7fc03ca9bd0c90cf67ba0eceba93bffbec9
parentfadb812a52bbf14c7b4850e6a5fdd81405d8b5f5 (diff)
parent0c3a04777cc5fa8bc43b57b789e72630781ef56a (diff)
downloadCMake-9e7f9bbf56b5d9201da0cc5b360555101c6c6a36.zip
CMake-9e7f9bbf56b5d9201da0cc5b360555101c6c6a36.tar.gz
CMake-9e7f9bbf56b5d9201da0cc5b360555101c6c6a36.tar.bz2
Merge topic 'android-ndk-r13'
0c3a0477 Android: Update libc++ include directories for NDK r13 ebef3632 Android: Suppress -Wattributes warnings in test case builds
-rw-r--r--Modules/Platform/Android/ndk-stl-c++.cmake8
-rw-r--r--Tests/RunCMake/Android/common.cmake4
2 files changed, 9 insertions, 3 deletions
diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake
index 14748a1..cb9fd68 100644
--- a/Modules/Platform/Android/ndk-stl-c++.cmake
+++ b/Modules/Platform/Android/ndk-stl-c++.cmake
@@ -3,7 +3,13 @@ set(_ANDROID_STL_RTTI 1)
set(_ANDROID_STL_EXCEPTIONS 1)
macro(__android_stl_cxx lang filename)
# Add the include directory.
- __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1)
+ 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)
+ else()
+ # r13 and above
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1)
+ endif()
# Add a secondary include directory if it exists.
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake
index 7eac5d6..6ea0909 100644
--- a/Tests/RunCMake/Android/common.cmake
+++ b/Tests/RunCMake/Android/common.cmake
@@ -17,8 +17,8 @@ foreach(f
endif()
endforeach()
-string(APPEND CMAKE_C_FLAGS " -Werror")
-string(APPEND CMAKE_CXX_FLAGS " -Werror")
+string(APPEND CMAKE_C_FLAGS " -Werror -Wno-attributes")
+string(APPEND CMAKE_CXX_FLAGS " -Werror -Wno-attributes")
string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,-no-undefined")
if(CMAKE_ANDROID_NDK)