[CMake] CMake + Gradle for Android

Eric Wing ewmailing at gmail.com
Tue Aug 8 20:21:08 EDT 2017


Hi Jom,

I'm glad to hear Android's CMake will eventually catch up.

But since you are here, can you add a feature that allows a user to
specify an alternate location for where CMake is located? There are
two useful cases for this.

1) Users daring or desperate enough to try using a more recent CMake
while they wait (perhaps they could have merged with Google's branch
manually)

2) In my case, I'm trying to implement new features into CMake (Swift
compiler support). It's not going to be mainlined anytime soon since
it is a long project, so even when you catch up, I still need to be
able to call my fork of CMake.

I don't want to overwrite anything in the Android distribution, and I
have people using my stuff and helping me, so we need a way to
collaborate. A simple gradle argument that lets me specify an
alternative path to CMake would fix my problem. (The other things I
need are specifying a toolchain file which I think you already support
and an Initial Cache (-C switch) which maybe is implicitly supported
since it is just a generic CMake command line argument.


Right now, I am doing the alternative method of calling CMake myself
through Gradle/Groovy scripts as people used to do. But I never
figured out how to get debugger integration with Android Studio as a
consequence. I would really like to move to the official Google/CMake
support, but I can't do that unless I can invoke a different CMake. (I
did pull the Google fork of CMake and I think my changes are
mergable.)

Thanks,
Eric


More information about the CMake mailing list