Files
CMake/Modules/Compiler
Boris Egorov 1c86e397fe Android/Clang: Tolerate undefined CMAKE_ANDROID_NDK_VERSION
The previous fix for #21772, commit 005e2cdfb0 (Android: Do not use gold
for ndk >= r22, 2021-02-26, v3.20.0-rc3~1^2), doesn't work with typical
android toolchain file, like this one:

    https://android.googlesource.com/platform/ndk/+/master/build/cmake/android-legacy.toolchain.cmake

The condition fails to work when CMAKE_ANDROID_NDK_VERSION is undefined:
second part evaluates to true, although ndk version is not known.

I've encountered following environment where CMAKE_ANDROID_NDK_VERSION
is used without definition:

* Build uses android toolchain file, which sets CMAKE_SYSTEM_VERSION=1
  and doesn't set CMAKE_ANDROID_NDK_VERSION.
* Code in Platform/Android-Determine.cmake exits early when it detects
  toolchain usage (via value CMAKE_SYSTEM_VERSION=1). This file is the
  only place in cmake modules where variable CMAKE_ANDROID_NDK_VERSION
  is set, and by early return we skip this definition.
2022-09-16 10:36:58 -04:00
..
2022-04-04 17:05:09 +01:00
2021-07-21 20:25:02 +03:00
2021-05-10 10:19:13 -04:00