(inspired by discussion here: #10976 (comment) and #10752 (comment))
This makes all includes in the project relative to the project root only.
There are some advantages to this, both for developers and for the compiler:
- It’s immediately apparent where an included file is when reading the code
- There is no confusion if a certain filename is not unique in the project (so there can be an
src/init.h
andsrc/wallet/init.h
without potential confusion, as discussed in #10976) - By switching to
<...>
includes the compiler doesn’t have to look everywhere, resulting in less ‘probing’ before looking in the include path-I
which can affect compilation performance. For example right now whenprimitives/block.h
includes “primitives/transaction.h”, it will look insrc/primitives/primitives
first.
Most of the changes by number are in src/qt
as all the source files there assume that they can include from there. I’ve separated this out, so that we could decide to do this only for non-qt files first ,for example.
Ping @theuni @ryanofsky