Skip to content

Commit

Permalink
Revert "chore: Remove moc_included_test.cpp"
Browse files Browse the repository at this point in the history
This reverts commit 2ec66c8.
  • Loading branch information
daschuer committed Sep 26, 2023
1 parent 8dc6b69 commit 10a45a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/util/logger.cpp
src/util/logging.cpp
src/util/mac.cpp
src/util/moc_included_test.cpp
src/util/movinginterquartilemean.cpp
src/util/performancetimer.cpp
src/util/rangelist.cpp
Expand Down Expand Up @@ -2092,6 +2093,7 @@ add_executable(mixxx-test
src/test/wbatterytest.cpp
src/test/wpushbutton_test.cpp
src/test/wwidgetstack_test.cpp
src/util/moc_included_test.cpp
)
find_package(GTest CONFIG REQUIRED)
set_target_properties(mixxx-test PROPERTIES AUTOMOC ON)
Expand Down
8 changes: 8 additions & 0 deletions src/util/moc_included_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "../mocs_compilation.cpp"

// QT_VERSION will be defined by any moc_<header_base>.cpp file included from mocs_compilation.cpp
// It is empty in case all moc files are included, a requirement to speed up incremental builds.
// See https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html for details.
#ifdef QT_VERSION
#error mocs_compilation.cpp not empty. Move all #include "moc_<header_base>.cpp" lines from mocs_compilation.cpp to the cpp files of the related classes.
#endif

0 comments on commit 10a45a3

Please sign in to comment.