Description
Problem
I want to be able to compile unit tests without compiling the rest of the engine. This is especially important if I'm editing fundamental Irrlicht headers. The same goes for benchmarks.
I also do not want release builds to have unit tests mixed in (e.g. I recall some Ubuntu builds where they would just segfault; otherwise they can't run fully because devtest is missing).
Furthermore (probably for the above reasons and more) there is an expectation for unit tests to be separate. See #16072 (comment).
Solutions
Make the C++ unit tests & benchmarks a separate build target.
Alternatives
Leave it as is. Tolerable but sometimes a bit annoying; currently I see this as low priority.
We can also split up headers a bit to avoid unnecessary transitive includes and improve compile times overall. For a large header like matrix4.h
(some two kloc) which is (transitively) included hundreds of times, this should make a difference.
Additional context
See also: #13610. Ideally everything should be managed by Catch2 in the end.