Description
The NDK's CMake toolchain file sets a variable named CMAKE_ANDROID_EXCEPTION, but it should be CMAKE_ANDROID_EXCEPTIONS (note the plural rather than singular). This variable will therefore have no effect when CMake is deciding whether to add -fexceptions or -fno-exceptions to the CMAKE_<LANG>_FLAGS_INIT flags, resulting in the flag being determined purely based on the selected STL type. This only affects build arrangements where ANDROID_CPP_FEATURES is set (I'm not sure what situations do that).
Environment Details
Found while working on macOS on an M1 machine. NDK 23.1.7779620 was installed via Android Studio, but the toolchain file from a standalone NDK package (r24-beta1) still has the same problem.