Hi guys,
This feature is common in other build systems (selecting the target platform and the toolchain via command line).
Right now, Gradle selects the current platform and toolchains, and the user cannot force either of them. This causes the following limitations related to cross compiling and project generation:
-
Cross compiling is limited to the fixed OS/Toolchains imposed by Gradle. For example, I’m trying to build a project using emscripten (basically, is a custom gcc toolchain). With the current Gradle model, I can only build with a GCC like toolchain in Linux. I’m forced to use Linux.
-
Generating Visual Studio projects only works on Windows. If support for other IDEs is added, those projects would be limited to their “native” platforms. There are lots of scenarios in which you could want to generate a project for a IDE in foreign OS/platform.
Also, after playing a bit with the native build (I managed to build a large C/C++ project) I found the concepts of platform a bit ambiguous conceptually and in use. Sometimes it an OS and other times an architecture or both. Am I missing something?
Awesome work BTW, and I really would love to use Gradle as a CMake alternative.
Thanks.