D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
By using private_dir_include() instead of enumerating headers in sources
of declare_dependency. Much more convenient, especially when there are
many headers.
Found out about this by reading #4638. It is not documented anywhere as
far as I can tell.
Including the following that has come up several times recent:
- How to use codegen for headers (that each target that uses the header
needs the object in it's sources)
- Using custom_targets with multiple outputs
This allows us to more easily have the documentation in sync with
the source code as people will have to document new features etc
right at the time where they implement it.