Skip to content

Commit 107d4df

Browse files
committed
More on cmake build
1 parent f0be53a commit 107d4df

File tree

18 files changed

+23
-43
lines changed

18 files changed

+23
-43
lines changed

src/callsign.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ class Callsign : public QObject
103103

104104
bool valid; // The entered string is a correct callsign
105105
bool prefValid; // The entered string is a correct prefix
106-
107-
108-
109-
110106
};
111107

112108
#endif // CALLSIGN_H

tests/tst_adif/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ add_executable(tst_adif
2525
../../src/klogdefinitions.h
2626
)
2727

28-
# Enable MOC for Qt signals/slots if needed
29-
set(CMAKE_AUTOMOC ON)
30-
3128
# Link with Qt6 Core and Test
3229
target_link_libraries(tst_adif
3330
Qt6::Core

tests/tst_callsign/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ add_executable(tst_callsign
2323
../../src/klogdefinitions.h
2424
)
2525

26-
# Enable MOC for Qt signals/slots if needed
27-
set(CMAKE_AUTOMOC ON)
28-
2926
# Link with Qt6 Core and Test
3027
target_link_libraries(tst_callsign
3128
Qt6::Core

tests/tst_database/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ add_executable(tst_database
4444
../../src/utilities.h
4545
)
4646

47-
# Enable MOC for Qt signals/slots if needed
48-
set(CMAKE_AUTOMOC ON)
49-
5047
# Link with Qt6 Core and Test
5148
target_link_libraries(tst_database
5249
Qt6::Core

tests/tst_dataproxy/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ add_executable(tst_dataproxy
4242
../../src/adif.h
4343
)
4444

45-
# Enable MOC for Qt signals/slots if needed
46-
set(CMAKE_AUTOMOC ON)
47-
4845
# Link with Qt6 Core and Test
4946
target_link_libraries(tst_dataproxy
5047
Qt6::Core

tests/tst_dxspot/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ set(CMAKE_AUTOMOC ON)
1111

1212
# Collect test sources
1313
file(GLOB TEST_SOURCES "*.cpp")
14+
# Exclude any stale/generated files that might be in the source tree
15+
list(FILTER TEST_SOURCES EXCLUDE REGEX "/moc_.*\\.cpp$")
16+
list(FILTER TEST_SOURCES EXCLUDE REGEX "/ui_.*\\.cpp$")
17+
list(FILTER TEST_SOURCES EXCLUDE REGEX "/qrc_.*\\.cpp$")
18+
1419
file(GLOB TEST_HEADERS "*.h")
1520

1621
# Create the test executable
@@ -27,9 +32,6 @@ add_executable(tst_dxspot
2732
../../src/klogdefinitions.h
2833
)
2934

30-
# Enable MOC for Qt signals/slots if needed
31-
set(CMAKE_AUTOMOC ON)
32-
3335
# Link with Qt6 Core and Test
3436
target_link_libraries(tst_dxspot
3537
Qt6::Core

tests/tst_filemanager/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ target_link_libraries(tst_filemanager
5656
Qt6::Core
5757
Qt6::Test
5858
Qt6::Sql
59+
Qt6::Widgets
5960
)
6061

6162
# Register the test with CTest

tests/tst_logwindow/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ target_link_libraries(tst_logwindow
6060
Qt6::Core
6161
Qt6::Test
6262
Qt6::Sql
63+
Qt6::Widgets
6364
)
6465

6566
# Register the test with CTest

tests/tst_main/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,14 @@ add_executable(tst_main
209209
../../src/world.h
210210
)
211211

212-
# Enable MOC for Qt signals/slots if needed
213-
set(CMAKE_AUTOMOC ON)
214-
215212
# Link with Qt6 Core and Test
216213
target_link_libraries(tst_main
217214
Qt6::Core
215+
Qt6::Charts
216+
Qt6::Network
217+
Qt6::PrintSupport
218+
Qt6::Quick
219+
Qt6::SerialPort
218220
Qt6::Test
219221
Qt6::Sql
220222
Qt6::Widgets

tests/tst_main/tst_main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ private slots:
6565
}
6666
};
6767

68+
QTEST_MAIN(tst_Main)
69+
#include "tst_main.moc"
70+

0 commit comments

Comments
 (0)