diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-05-29 07:23:20 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-05-29 07:23:20 +0000 |
commit | d86a66da78a0b81f9e2271417cd6204431467e73 (patch) | |
tree | 8b1e3f7deec425d2e01818084e2d10c51d11214d /cmake/platforms | |
parent | 530086925695f074b0e1e38a0d88ee6a4c91c54c (diff) | |
download | external_llvm-d86a66da78a0b81f9e2271417cd6204431467e73.zip external_llvm-d86a66da78a0b81f9e2271417cd6204431467e73.tar.gz external_llvm-d86a66da78a0b81f9e2271417cd6204431467e73.tar.bz2 |
Allow overriding the location of C/C++ compilers in Android CMake build.
Patch by Greg Fitzgerald.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/platforms')
-rw-r--r-- | cmake/platforms/Android.cmake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/platforms/Android.cmake b/cmake/platforms/Android.cmake index 72849b1..35df5eb 100644 --- a/cmake/platforms/Android.cmake +++ b/cmake/platforms/Android.cmake @@ -11,8 +11,15 @@ # make <target> SET(CMAKE_SYSTEM_NAME Linux) -SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang) -SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang++) + +IF(NOT CMAKE_C_COMPILER) + SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang) +ENDIF() + +IF(NOT CMAKE_CXX_COMPILER) + SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang++) +ENDIF() + SET(ANDROID "1" CACHE STRING "ANDROID" FORCE) SET(ANDROID_COMMON_FLAGS "-target arm-linux-androideabi --sysroot=${LLVM_ANDROID_TOOLCHAIN_DIR}/sysroot -B${LLVM_ANDROID_TOOLCHAIN_DIR} -mllvm -arm-enable-ehabi") |