Include suggested changes by clang-tidy
[pulseview.git] / test / CMakeLists.txt
1 ##
2 ## This file is part of the PulseView project.
3 ##
4 ## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
5 ## Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
6 ##
7 ## This program is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 2 of the License, or
10 ## (at your option) any later version.
11 ##
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ## GNU General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 ##
20
21 set(pulseview_TEST_SOURCES
22         ${PROJECT_SOURCE_DIR}/pv/devicemanager.cpp
23         ${PROJECT_SOURCE_DIR}/pv/globalsettings.cpp
24         ${PROJECT_SOURCE_DIR}/pv/logging.cpp
25         ${PROJECT_SOURCE_DIR}/pv/mainwindow.cpp
26         ${PROJECT_SOURCE_DIR}/pv/session.cpp
27         ${PROJECT_SOURCE_DIR}/pv/storesession.cpp
28         ${PROJECT_SOURCE_DIR}/pv/util.cpp
29         ${PROJECT_SOURCE_DIR}/pv/binding/binding.cpp
30         ${PROJECT_SOURCE_DIR}/pv/binding/device.cpp
31         ${PROJECT_SOURCE_DIR}/pv/binding/inputoutput.cpp
32         ${PROJECT_SOURCE_DIR}/pv/data/analog.cpp
33         ${PROJECT_SOURCE_DIR}/pv/data/analogsegment.cpp
34         ${PROJECT_SOURCE_DIR}/pv/data/logic.cpp
35         ${PROJECT_SOURCE_DIR}/pv/data/logicsegment.cpp
36         ${PROJECT_SOURCE_DIR}/pv/data/segment.cpp
37         ${PROJECT_SOURCE_DIR}/pv/data/signalbase.cpp
38         ${PROJECT_SOURCE_DIR}/pv/data/signaldata.cpp
39         ${PROJECT_SOURCE_DIR}/pv/devices/device.cpp
40         ${PROJECT_SOURCE_DIR}/pv/devices/file.cpp
41         ${PROJECT_SOURCE_DIR}/pv/devices/hardwaredevice.cpp
42         ${PROJECT_SOURCE_DIR}/pv/devices/inputfile.cpp
43         ${PROJECT_SOURCE_DIR}/pv/devices/sessionfile.cpp
44         ${PROJECT_SOURCE_DIR}/pv/dialogs/connect.cpp
45         ${PROJECT_SOURCE_DIR}/pv/dialogs/inputoutputoptions.cpp
46         ${PROJECT_SOURCE_DIR}/pv/dialogs/settings.cpp
47         ${PROJECT_SOURCE_DIR}/pv/dialogs/storeprogress.cpp
48         ${PROJECT_SOURCE_DIR}/pv/prop/bool.cpp
49         ${PROJECT_SOURCE_DIR}/pv/prop/double.cpp
50         ${PROJECT_SOURCE_DIR}/pv/prop/enum.cpp
51         ${PROJECT_SOURCE_DIR}/pv/prop/int.cpp
52         ${PROJECT_SOURCE_DIR}/pv/prop/property.cpp
53         ${PROJECT_SOURCE_DIR}/pv/prop/string.cpp
54         ${PROJECT_SOURCE_DIR}/pv/popups/channels.cpp
55         ${PROJECT_SOURCE_DIR}/pv/popups/deviceoptions.cpp
56         ${PROJECT_SOURCE_DIR}/pv/toolbars/mainbar.cpp
57         ${PROJECT_SOURCE_DIR}/pv/views/trace/analogsignal.cpp
58         ${PROJECT_SOURCE_DIR}/pv/views/trace/cursor.cpp
59         ${PROJECT_SOURCE_DIR}/pv/views/trace/cursorpair.cpp
60         ${PROJECT_SOURCE_DIR}/pv/views/trace/flag.cpp
61         ${PROJECT_SOURCE_DIR}/pv/views/trace/header.cpp
62         ${PROJECT_SOURCE_DIR}/pv/views/trace/marginwidget.cpp
63         ${PROJECT_SOURCE_DIR}/pv/views/trace/logicsignal.cpp
64         ${PROJECT_SOURCE_DIR}/pv/views/trace/rowitem.cpp
65         ${PROJECT_SOURCE_DIR}/pv/views/trace/ruler.cpp
66         ${PROJECT_SOURCE_DIR}/pv/views/trace/signal.cpp
67         ${PROJECT_SOURCE_DIR}/pv/views/trace/timeitem.cpp
68         ${PROJECT_SOURCE_DIR}/pv/views/trace/timemarker.cpp
69         ${PROJECT_SOURCE_DIR}/pv/views/trace/trace.cpp
70         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracegroup.cpp
71         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracepalette.cpp
72         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracetreeitem.cpp
73         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracetreeitemowner.cpp
74         ${PROJECT_SOURCE_DIR}/pv/views/trace/triggermarker.cpp
75         ${PROJECT_SOURCE_DIR}/pv/views/trace/view.cpp
76         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewitem.cpp
77         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewitemowner.cpp
78         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewitempaintparams.cpp
79         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewport.cpp
80         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewwidget.cpp
81         ${PROJECT_SOURCE_DIR}/pv/views/viewbase.cpp
82         ${PROJECT_SOURCE_DIR}/pv/views/trace/standardbar.cpp
83         ${PROJECT_SOURCE_DIR}/pv/widgets/colorbutton.cpp
84         ${PROJECT_SOURCE_DIR}/pv/widgets/colorpopup.cpp
85         ${PROJECT_SOURCE_DIR}/pv/widgets/devicetoolbutton.cpp
86         ${PROJECT_SOURCE_DIR}/pv/widgets/exportmenu.cpp
87         ${PROJECT_SOURCE_DIR}/pv/widgets/importmenu.cpp
88         ${PROJECT_SOURCE_DIR}/pv/widgets/popup.cpp
89         ${PROJECT_SOURCE_DIR}/pv/widgets/popuptoolbutton.cpp
90         ${PROJECT_SOURCE_DIR}/pv/widgets/sweeptimingwidget.cpp
91         ${PROJECT_SOURCE_DIR}/pv/widgets/timestampspinbox.cpp
92         ${PROJECT_SOURCE_DIR}/pv/widgets/wellarray.cpp
93         data/analogsegment.cpp
94         data/logicsegment.cpp
95         data/segment.cpp
96         view/ruler.cpp
97         test.cpp
98         util.cpp
99 )
100
101 # This list includes only QObject derived class headers.
102 set(pulseview_TEST_HEADERS
103         ${PROJECT_SOURCE_DIR}/pv/devicemanager.hpp
104         ${PROJECT_SOURCE_DIR}/pv/globalsettings.hpp
105         ${PROJECT_SOURCE_DIR}/pv/logging.hpp
106         ${PROJECT_SOURCE_DIR}/pv/mainwindow.hpp
107         ${PROJECT_SOURCE_DIR}/pv/session.hpp
108         ${PROJECT_SOURCE_DIR}/pv/storesession.hpp
109         ${PROJECT_SOURCE_DIR}/pv/binding/device.hpp
110         ${PROJECT_SOURCE_DIR}/pv/data/analog.hpp
111         ${PROJECT_SOURCE_DIR}/pv/data/analogsegment.hpp
112         ${PROJECT_SOURCE_DIR}/pv/data/logic.hpp
113         ${PROJECT_SOURCE_DIR}/pv/data/logicsegment.hpp
114         ${PROJECT_SOURCE_DIR}/pv/data/signalbase.hpp
115         ${PROJECT_SOURCE_DIR}/pv/devices/device.hpp
116         ${PROJECT_SOURCE_DIR}/pv/dialogs/connect.hpp
117         ${PROJECT_SOURCE_DIR}/pv/dialogs/inputoutputoptions.hpp
118         ${PROJECT_SOURCE_DIR}/pv/dialogs/settings.hpp
119         ${PROJECT_SOURCE_DIR}/pv/dialogs/storeprogress.hpp
120         ${PROJECT_SOURCE_DIR}/pv/popups/channels.hpp
121         ${PROJECT_SOURCE_DIR}/pv/popups/deviceoptions.hpp
122         ${PROJECT_SOURCE_DIR}/pv/prop/bool.hpp
123         ${PROJECT_SOURCE_DIR}/pv/prop/double.hpp
124         ${PROJECT_SOURCE_DIR}/pv/prop/enum.hpp
125         ${PROJECT_SOURCE_DIR}/pv/prop/int.hpp
126         ${PROJECT_SOURCE_DIR}/pv/prop/property.hpp
127         ${PROJECT_SOURCE_DIR}/pv/prop/string.hpp
128         ${PROJECT_SOURCE_DIR}/pv/toolbars/mainbar.hpp
129         ${PROJECT_SOURCE_DIR}/pv/views/trace/analogsignal.hpp
130         ${PROJECT_SOURCE_DIR}/pv/views/trace/cursor.hpp
131         ${PROJECT_SOURCE_DIR}/pv/views/trace/flag.hpp
132         ${PROJECT_SOURCE_DIR}/pv/views/trace/header.hpp
133         ${PROJECT_SOURCE_DIR}/pv/views/trace/logicsignal.hpp
134         ${PROJECT_SOURCE_DIR}/pv/views/trace/marginwidget.hpp
135         ${PROJECT_SOURCE_DIR}/pv/views/trace/rowitem.hpp
136         ${PROJECT_SOURCE_DIR}/pv/views/trace/ruler.hpp
137         ${PROJECT_SOURCE_DIR}/pv/views/trace/signal.hpp
138         ${PROJECT_SOURCE_DIR}/pv/views/trace/timeitem.hpp
139         ${PROJECT_SOURCE_DIR}/pv/views/trace/timemarker.hpp
140         ${PROJECT_SOURCE_DIR}/pv/views/trace/trace.hpp
141         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracegroup.hpp
142         ${PROJECT_SOURCE_DIR}/pv/views/trace/tracetreeitem.hpp
143         ${PROJECT_SOURCE_DIR}/pv/views/trace/triggermarker.hpp
144         ${PROJECT_SOURCE_DIR}/pv/views/trace/view.hpp
145         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewitem.hpp
146         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewport.hpp
147         ${PROJECT_SOURCE_DIR}/pv/views/trace/viewwidget.hpp
148         ${PROJECT_SOURCE_DIR}/pv/views/viewbase.hpp
149         ${PROJECT_SOURCE_DIR}/pv/views/trace/standardbar.hpp
150         ${PROJECT_SOURCE_DIR}/pv/widgets/colorbutton.hpp
151         ${PROJECT_SOURCE_DIR}/pv/widgets/colorpopup.hpp
152         ${PROJECT_SOURCE_DIR}/pv/widgets/devicetoolbutton.hpp
153         ${PROJECT_SOURCE_DIR}/pv/widgets/exportmenu.hpp
154         ${PROJECT_SOURCE_DIR}/pv/widgets/importmenu.hpp
155         ${PROJECT_SOURCE_DIR}/pv/widgets/popup.hpp
156         ${PROJECT_SOURCE_DIR}/pv/widgets/popuptoolbutton.hpp
157         ${PROJECT_SOURCE_DIR}/pv/widgets/sweeptimingwidget.hpp
158         ${PROJECT_SOURCE_DIR}/pv/widgets/timestampspinbox.hpp
159         ${PROJECT_SOURCE_DIR}/pv/widgets/wellarray.hpp
160 )
161
162 if(ENABLE_DECODE)
163         list(APPEND pulseview_TEST_SOURCES
164                 ${PROJECT_SOURCE_DIR}/pv/binding/decoder.cpp
165                 ${PROJECT_SOURCE_DIR}/pv/data/decodesignal.cpp
166                 ${PROJECT_SOURCE_DIR}/pv/data/decode/annotation.cpp
167                 ${PROJECT_SOURCE_DIR}/pv/data/decode/decoder.cpp
168                 ${PROJECT_SOURCE_DIR}/pv/data/decode/row.cpp
169                 ${PROJECT_SOURCE_DIR}/pv/data/decode/rowdata.cpp
170                 ${PROJECT_SOURCE_DIR}/pv/views/trace/decodetrace.cpp
171                 ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.cpp
172                 ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.cpp
173         )
174
175         list(APPEND pulseview_TEST_HEADERS
176                 ${PROJECT_SOURCE_DIR}/pv/data/decodesignal.hpp
177                 ${PROJECT_SOURCE_DIR}/pv/views/trace/decodetrace.hpp
178                 ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.hpp
179                 ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.hpp
180         )
181 endif()
182
183 # On MinGW we need to use static linking.
184 if(NOT WIN32)
185         add_definitions(-DBOOST_TEST_DYN_LINK)
186 endif()
187
188 add_executable(pulseview-test
189         ${pulseview_TEST_SOURCES}
190         ${pulseview_TEST_HEADERS_MOC}
191 )
192
193 target_link_libraries(pulseview-test ${PULSEVIEW_LINK_LIBS})
194