summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android-GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-06 17:56:21 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-12 14:40:54 (GMT)
commitfa6325782112063b5d425714a37c8ebd01b90d7c (patch)
treeb18d5d78cd889a6489589a03087d70a34b82095e /Modules/Platform/Android-GNU.cmake
parent6299693f8aa5f5a61cec82215b73a2040a8d8603 (diff)
downloadCMake-fa6325782112063b5d425714a37c8ebd01b90d7c.zip
CMake-fa6325782112063b5d425714a37c8ebd01b90d7c.tar.gz
CMake-fa6325782112063b5d425714a37c8ebd01b90d7c.tar.bz2
Android: Avoid interfering with common pre-existing toolchain files
Commonly used Android toolchain files that pre-date CMake upstream support may need to be updated to work with our new functionality. They typically set CMAKE_SYSTEM_VERSION to 1, so detect that and skip our upstream Android settings. When such toolchain files are updated to account for our upstream support, they can then set CMAKE_SYSTEM_VERSION to a valid Android API and get new behavior.
Diffstat (limited to 'Modules/Platform/Android-GNU.cmake')
-rw-r--r--Modules/Platform/Android-GNU.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Platform/Android-GNU.cmake b/Modules/Platform/Android-GNU.cmake
index 4f25bf3..8c3ea1d 100644
--- a/Modules/Platform/Android-GNU.cmake
+++ b/Modules/Platform/Android-GNU.cmake
@@ -26,6 +26,14 @@ if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
return()
endif()
+# Commonly used Android toolchain files that pre-date CMake upstream support
+# set CMAKE_SYSTEM_VERSION to 1. Avoid interfering with them.
+if(CMAKE_SYSTEM_VERSION EQUAL 1)
+ macro(__android_compiler_gnu lang)
+ endmacro()
+ return()
+endif()
+
include(Platform/Android-Common)
macro(__android_compiler_gnu lang)