Skip to content

Commit

Permalink
Merge pull request #12037 from daschuer/precompiled-headers-fix
Browse files Browse the repository at this point in the history
Precompiled headers fix
  • Loading branch information
JoergAtGithub authored Sep 27, 2023
2 parents 814fd46 + 97255f8 commit 6a0b42c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 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 @@ -1476,6 +1477,8 @@ else()
endif()
endif()

set_source_files_properties(src/util/moc_included_test.cpp PROPERTIES SKIP_PRECOMPILE_HEADERS ON)

set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON CXX_CLANG_TIDY "${CLANG_TIDY}")
target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src")
if(UNIX AND NOT APPLE)
Expand Down Expand Up @@ -2092,6 +2095,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
1 change: 0 additions & 1 deletion src/test/ringdelaybuffer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <gtest/gtest.h>

#include <QTest>
#include <span>

#include "test/mixxxtest.h"
#include "util/samplebuffer.h"
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
2 changes: 0 additions & 2 deletions src/util/ringdelaybuffer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "ringdelaybuffer.h"

#include <span>

#include "util/math.h"
#include "util/sample.h"

Expand Down

0 comments on commit 6a0b42c

Please sign in to comment.