C++ Logo

std-proposals

Advanced search

Re: We should use existing scientific research in building C++ modules

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Fri, 15 May 2020 13:17:24 -0400
On 15/05/2020 12.44, Askar Safin via Std-Proposals wrote:
> Hi. I want to share some thoughts and links on the problem of
> building C++20 modules (and Fortran modules). Building modules is
> hard, see [FORTRAN] and [CONCERNS].
> [...]
> * [FORTRAN] (published Oct 2018) says that existing build systems
> fail to build Fortran modules reliable. In particular, [FORTRAN]
> blames standard version of Ninja and says that Ninja requires custom
> patches to build Fortran modules. But Ninja 1.10 (released Jan 2020)
> seem to solve problem of building Fortran modules using so-called
> "dynamic dependencies" [NINJA]. Maybe same solution could be used for
> C++ modules?

That is, indeed, the plan. Incidentally, C++ adding modules was a major
impetus to finally landing this code in Ninja proper.

BTW, as I understand it, some of this stuff is going to be addressed in
the forthcoming SG15 TR.

> * [FORTRAN] recommends using cmake with make back-end for building
> Fortran modules. And mentions large amount of cmake code, which was
> added to support Fortran modules. Maybe all this code can be removed
> due to presence of Ninja feature I talk above?

That sounds like a question for a CMake developer (probably Ben, Brad or
Kyle), but my guess would be that that code, rather than going away, is
becoming more generalized to support both Fortran and now also C++.

> * I recommend learning very elegant solutions suggested by build systems [REDO] and [TUP]

Hmm, I wonder if redo would make an interesting target for CMake? (Based
on lack of professionalism in the documentation, I have serious
reservations about tup...)

> [FORTRAN] http://wg21.link/p1300r0
> [CONCERNS] http://wg21.link/p1427r0
> [ALACARTE] https://dl.acm.org/doi/pdf/10.1145/3236774?download=true
> [REDO] https://redo.readthedocs.io/en/latest/
> [TUP] http://gittup.org/tup
-- 
Matthew

Received on 2020-05-15 12:20:31