[cmake-developers] enable_language behavior change

Robert Dailey rcdailey.lists at gmail.com
Thu Mar 23 12:08:43 EDT 2017


On Thu, Mar 23, 2017 at 10:50 AM, Brad King <brad.king at kitware.com> wrote:
> On 03/23/2017 11:35 AM, Robert Dailey wrote:
>> Thanks Brad. For future reference, are these changes documented
>> anywhere? I searched for "enable_language" in the 3.6 release notes,
>> and there is no 3.6 entry for policy changes.
>
> The release notes are for new features, deprecations, and major
> user-facing changes.  We do not cloud them with every bug fix.
>
> This enable_language change was a bug fix that prevented a crash
> in some cases.  I was not aware that there were valid projects
> that trigger the error.
>
> -Brad
>

Crystax NDK (on master branch) has a toolchain.cmake which invokes
enable_language() but it fails. I guess they didn't test with 3.6 or
greater. Basically any of the android.toolchain.cmake scripts floating
around have this problem, since they're all modifications of the same
base change by takanome:

https://github.com/taka-no-me/android-cmake

I've introduced a PR on the Crystax project to fix the problem,
although I do not know if I'm actually addressing the root cause. My
assumption is that the C language is already enabled, but they invoke
enable_language(C) anyway for some reason.

https://github.com/crystax/android-platform-ndk/pull/16


More information about the cmake-developers mailing list