summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android/abi-armeabi-GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-02 19:11:42 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-23 16:51:58 (GMT)
commitb22294bc41c3ce62e561c7123c3f489a750dcb66 (patch)
treee4d69ae3c1d70330ca09ef9ea80fc0433cc8af2b /Modules/Platform/Android/abi-armeabi-GNU.cmake
parentb6a3102a9f8da05b50d4f4e96dd9f42ace37aa9b (diff)
downloadCMake-b22294bc41c3ce62e561c7123c3f489a750dcb66.zip
CMake-b22294bc41c3ce62e561c7123c3f489a750dcb66.tar.gz
CMake-b22294bc41c3ce62e561c7123c3f489a750dcb66.tar.bz2
Android: Populate compiler flags for current ABI
Initialize the CMAKE_{C,CXX}_FLAGS{,_<CONFIG>} cache entries with flags for each ABI as specified by NDK toolchain `setup.mk` files.
Diffstat (limited to 'Modules/Platform/Android/abi-armeabi-GNU.cmake')
-rw-r--r--Modules/Platform/Android/abi-armeabi-GNU.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Platform/Android/abi-armeabi-GNU.cmake b/Modules/Platform/Android/abi-armeabi-GNU.cmake
index d621e72..10cac00 100644
--- a/Modules/Platform/Android/abi-armeabi-GNU.cmake
+++ b/Modules/Platform/Android/abi-armeabi-GNU.cmake
@@ -1,2 +1,18 @@
# <ndk>/build/core/toolchains/arm-linux-androideabi-4.9/setup.mk
+string(APPEND _ANDROID_ABI_INIT_CFLAGS
+ " -march=armv5te"
+ )
+
+if(CMAKE_ANDROID_ARM_MODE)
+ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -marm")
+else()
+ string(APPEND _ANDROID_ABI_INIT_CFLAGS " -mthumb")
+endif()
+
+string(APPEND _ANDROID_ABI_INIT_CFLAGS
+ " -msoft-float"
+ " -mtune=xscale"
+ " -fpic"
+ )
+
include(Platform/Android/abi-common-GNU)