UI: Improve incremental compile times via explicit file includes

When a source file contains an explicit include with a filename
following the "moc_<actual-filename>.cpp" pattern, then CMake's
AUTOMOC generation tool will recognize the matching pair and generate
the replacement header file and add the required include directory
entries.

For all files which do contain Q_OBJECT or similar declarations but do
not have an explicit include directive, the global mocs_compilation.cpp
file will still be generated (which groups all "missing" generated
headers).

The larger this global file is, the more expensive incremental
compilation will be as this file (and all its contained generated
headers) will be re-generated regardless of whether actual changes
occurred.
This commit is contained in:
PatTheMav
2024-08-08 21:41:52 +02:00
committed by Ryan Foster
parent ab6ecde20f
commit 710d99ef4d
50 changed files with 50 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
#include "window-basic-about.hpp"
#include "moc_window-basic-about.cpp"
#include "window-basic-main.hpp"
#include "remote-text.hpp"
#include <qt-wrappers.hpp>