C++ Logo

sg15

Advanced search

Re: [Tooling] Modules

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 1 Feb 2019 01:07:32 +0200
On Fri, 1 Feb 2019 at 00:58, Ben Craig <ben.craig_at_[hidden]> wrote:
> “I'm reasonably sure from past experience is that a proper modular and parallized build requires that secondary layer. (To say nothing of performance concerns: rescanning constantly is a waste of computation.)”
>
> It may be the case that such concessions are necessary. However, I will argue that a significant portion of C++ projects don’t currently specify in their build files that foo.cpp depends on foo.h, boost/spirit.h, and the other hundred headers that boost/spirit.h drags in. I will go further and say that a significant portion of C++ projects rely on file globbing to even gather the list of .cpp files to compile. We should at least be aware of this cost and consider it, before requiring everyone to duplicate the build information that already exists in their source files and file system.

Well, here's a data point: QMake projects don't explicitly state such
dependencies; the dependencies are scanned, and then generated as
explicit dependencies
in the generated actual build files. Qt is moving to CMake, and I
don't think we expect to force our users to state dependencies
explicitly in that world, either.

There is no constant rescanning, though; QMake doesn't rescan and
regenerate on every build. So one could argue that the secondary layer
already exists there.

Received on 2019-02-01 00:07:46