-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists_tests.txt
More file actions
43 lines (37 loc) · 864 Bytes
/
Copy pathCMakeLists_tests.txt
File metadata and controls
43 lines (37 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.16)
# Add test executable
add_executable(test_errordashboard
test_errordashboard.cpp
../src/logentry.h
../src/logcollector.h
../src/logcollector.cpp
../src/threatdetector.h
../src/threatdetector.cpp
../src/statstab.h
../src/statstab.cpp
../src/mainwindow.h
../src/mainwindow.cpp
)
# Qt auto-processing
set_target_properties(test_errordashboard PROPERTIES
AUTOMOC ON
AUTORCC ON
AUTOUIC ON
)
# Link Qt libraries
target_link_libraries(test_errordashboard
Qt6::Core
Qt6::Gui
Qt6::Widgets
Qt6::Charts
Qt6::Test
systemd
)
# Include directories
target_include_directories(test_errordashboard PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../src
)
# Add test to CTest
add_test(NAME errordashboardTests COMMAND test_errordashboard)
# Enable CTest
enable_testing()