How do I tell Android Studio to use GCC 4.9 with CMake?
<p>I'm using NDK r12 with Android Studio 2.2. I need CMake to use GCC 4.9 instead of Clang to build our code base, however even if I provide the following it still uses clang:</p>

<pre><code>android {
    compileSdkVersion 17
    buildToolsVersion "25.0.0"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 17

        externalNativeBuild {
            cmake {
                arguments '-DBUILD_TESTING=OFF -DANDROID_TOOLCHAIN=gcc-4.9'
                cppFlags "-std=c++14 -fexceptions -frtti"
            }
        }
    }
}
</code></pre>

<p>I've tried <code>-DANDROID_TOOLCHAIN=gcc</code> as well but this doesn't work either. How can I get CMake to use GCC ARM toolchain?</p>