Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION

When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
This commit is contained in:
Brad King
2016-11-11 14:50:50 -05:00
parent 4a4be0301b
commit 3d42a72bd5
7 changed files with 32 additions and 4 deletions

View File

@@ -387,7 +387,7 @@ Configure use of an Android NDK with the following variables:
:variable:`CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION`
Set to the version of the NDK toolchain to be selected as the compiler.
If not specified, the latest available GCC toolchain will be used.
If not specified, the default will be the latest available GCC toolchain.
:variable:`CMAKE_ANDROID_STL_TYPE`
Set to specify which C++ standard library to use. If not specified,

View File

@@ -0,0 +1,6 @@
android-info-variables
----------------------
* When :ref:`Cross Compiling for Android with the NDK`, the
:variable:`CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION` variable is
now set by CMake if it is not set by the user or toolchain file.

View File

@@ -11,3 +11,6 @@ as the compiler. The variable must be set to one of these forms:
A toolchain of the requested version will be selected automatically to
match the ABI named in the :variable:`CMAKE_ANDROID_ARCH_ABI` variable.
If not specified, the default will be a value that selects the latest
available GCC toolchain.