[cmake-developers] Experiments in CMake support for Clang (header & standard) modules
Brad King
brad.king at kitware.com
Tue May 15 09:18:07 EDT 2018
On 05/15/2018 03:22 AM, Stephen Kelly wrote:
> So, the answer for cmake might be that CMake can learn to extract that
> stuff, but ignore certain cases like imports within ifdefs.
We'd need to do the extraction from already-preprocessed sources.
This is how Fortran+Ninja+CMake works. Unfortunately for C++
this will typically require preprocessing twice: once just to
extract module dependencies and again to actually compile. With
Fortran we compile using the already-preprocessed source but
doing that with C++ will break things like Clang's nice handling
of macros in diagnostic messages.
-Brad
More information about the cmake-developers
mailing list