diff options
Diffstat (limited to 'Tests/RunCMake/Android/common.cmake')
-rw-r--r-- | Tests/RunCMake/Android/common.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/Android/common.cmake b/Tests/RunCMake/Android/common.cmake index bef2428..015f202 100644 --- a/Tests/RunCMake/Android/common.cmake +++ b/Tests/RunCMake/Android/common.cmake @@ -92,3 +92,19 @@ if(CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a") endif() add_executable(android_c android.c) add_executable(android_cxx android.cxx) + +# Test that an explicit /usr/include is ignored in favor of +# appearing as a standard include directory at the end. +set(sysinc_dirs) +if(CMAKE_ANDROID_NDK) + if(NOT CMAKE_ANDROID_NDK_DEPRECATED_HEADERS) + list(APPEND sysinc_dirs ${CMAKE_SYSROOT_COMPILE}/usr/include) + else() + list(APPEND sysinc_dirs ${CMAKE_SYSROOT}/usr/include) + endif() +endif() +list(APPEND sysinc_dirs ${CMAKE_CURRENT_SOURCE_DIR}/sysinc) +add_executable(android_sysinc_c android_sysinc.c) +target_include_directories(android_sysinc_c SYSTEM PRIVATE ${sysinc_dirs}) +add_executable(android_sysinc_cxx android_sysinc.cxx) +target_include_directories(android_sysinc_cxx SYSTEM PRIVATE ${sysinc_dirs}) |