gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

Support C++ modules #1085

Open pedrolamarao opened 3 years ago

pedrolamarao commented 3 years ago

The C++ "modules" feature changes the game significantly for build tools.

C++ "modules" reduces the module "interface" from a mess of headers to an orderly "compiled module interface" (in GCC parlance). It changes nothing about the build output which remains static libraries, dynamic libraries and executables. Major toolchains support modules: GCC, Clang and Visual Studio. The time is still "early" but we are past "preview".

The only build tool which documents full suport for C++ modules is build2, a relatively new player in this field. CMake currently does not document full support, only workarounds.

Gradle should take on the opportunity to enter the field of C++ "modules". The new model should fit nicely to any mature dependency engine. It should also fit nicely with Gradle's current solution for native binary distribution and consumption via Maven. Mixed language projects would greatly benefit, as would IDEs like CLion.