[cmake-developers] Experiments in CMake support for Clang (header & standard) modules
Brad King
brad.king at kitware.com
Mon May 7 13:13:14 EDT 2018
On 05/07/2018 12:01 PM, Stephen Kelly wrote:
> Hopefully Brad or someone else can provide other input from research already done.
I'm not particularly familiar with what compiler writers or the modules
standard specification expects build systems to do w.r.t modules.
However, IIUC at least at one time the expectation was that the module
files would not be installed like headers and are used only within a
local build tree. Are modules even supposed to be first-class entities
in the build system specification that users write?
In the Fortran world users just list all the sources and build systems are
expected to figure it out. CMake has very good support for Fortran modules.
Our Ninja generator has rules to preprocess the translation units first,
then parse the preprocessed output to extract module definitions and usages,
then inject the added dependencies into the build graph, and then begin
compilation of sources ordered by those dependencies (this requires a
custom fork of Ninja pending upstream acceptance).
Is that what is expected from C++ buildsystems for modules too?
-Brad
More information about the cmake-developers
mailing list