Przeglądaj źródła

shared: 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.
PatTheMav 1 rok temu
rodzic
commit
5eb04cdf9d

+ 1 - 1
shared/properties-view/double-slider.cpp

@@ -1,4 +1,4 @@
-#include "double-slider.hpp"
+#include "moc_double-slider.cpp"
 
 #include <cmath>
 

+ 1 - 1
shared/properties-view/properties-view.cpp

@@ -27,7 +27,7 @@
 #include <QUuid>
 #include "double-slider.hpp"
 #include "spinbox-ignorewheel.hpp"
-#include "properties-view.hpp"
+#include "moc_properties-view.cpp"
 #include "properties-view.moc.hpp"
 
 #include <qt-wrappers.hpp>

+ 1 - 1
shared/properties-view/spinbox-ignorewheel.cpp

@@ -1,4 +1,4 @@
-#include "spinbox-ignorewheel.hpp"
+#include "moc_spinbox-ignorewheel.cpp"
 
 SpinBoxIgnoreScroll::SpinBoxIgnoreScroll(QWidget *parent) : QSpinBox(parent)
 {

+ 1 - 1
shared/qt/plain-text-edit/plain-text-edit.cpp

@@ -1,4 +1,4 @@
-#include <plain-text-edit.hpp>
+#include "moc_plain-text-edit.cpp"
 #include <QFontDatabase>
 
 OBSPlainTextEdit::OBSPlainTextEdit(QWidget *parent, bool monospace)

+ 1 - 1
shared/qt/slider-ignorewheel/slider-ignorewheel.cpp

@@ -1,4 +1,4 @@
-#include "slider-ignorewheel.hpp"
+#include "moc_slider-ignorewheel.cpp"
 
 SliderIgnoreScroll::SliderIgnoreScroll(QWidget *parent) : QSlider(parent)
 {

+ 1 - 1
shared/qt/vertical-scroll-area/vertical-scroll-area.cpp

@@ -1,5 +1,5 @@
 #include <QResizeEvent>
-#include "vertical-scroll-area.hpp"
+#include "moc_vertical-scroll-area.cpp"
 
 void VScrollArea::resizeEvent(QResizeEvent *event)
 {

+ 1 - 1
shared/qt/wrappers/qt-wrappers.cpp

@@ -15,7 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 
-#include "qt-wrappers.hpp"
+#include "moc_qt-wrappers.cpp"
 
 #include <graphics/graphics.h>
 #include <util/threading.h>