]> sigrok.org Git - pulseview.git/blame - test/CMakeLists.txt
Introduce time units
[pulseview.git] / test / CMakeLists.txt
CommitLineData
fb746bcc
AG
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
21set(pulseview_TEST_SOURCES
3b3a445c 22 ${PROJECT_SOURCE_DIR}/pv/devicemanager.cpp
f65cd27b 23 ${PROJECT_SOURCE_DIR}/pv/session.cpp
4ce6b5e7 24 ${PROJECT_SOURCE_DIR}/pv/storesession.cpp
3fe44dc6 25 ${PROJECT_SOURCE_DIR}/pv/util.cpp
61703a01 26 ${PROJECT_SOURCE_DIR}/pv/binding/binding.cpp
3cc9ad7b 27 ${PROJECT_SOURCE_DIR}/pv/binding/device.cpp
3b3a445c 28 ${PROJECT_SOURCE_DIR}/pv/data/analog.cpp
f3d66e52 29 ${PROJECT_SOURCE_DIR}/pv/data/analogsegment.cpp
3b3a445c 30 ${PROJECT_SOURCE_DIR}/pv/data/logic.cpp
f3d66e52
JH
31 ${PROJECT_SOURCE_DIR}/pv/data/logicsegment.cpp
32 ${PROJECT_SOURCE_DIR}/pv/data/segment.cpp
3b3a445c 33 ${PROJECT_SOURCE_DIR}/pv/data/signaldata.cpp
476f9ebf
SA
34 ${PROJECT_SOURCE_DIR}/pv/devices/device.cpp
35 ${PROJECT_SOURCE_DIR}/pv/devices/file.cpp
36 ${PROJECT_SOURCE_DIR}/pv/devices/hardwaredevice.cpp
37 ${PROJECT_SOURCE_DIR}/pv/devices/inputfile.cpp
38 ${PROJECT_SOURCE_DIR}/pv/devices/sessionfile.cpp
4ce6b5e7 39 ${PROJECT_SOURCE_DIR}/pv/prop/bool.cpp
a28c3025 40 ${PROJECT_SOURCE_DIR}/pv/prop/double.cpp
182d2f5d 41 ${PROJECT_SOURCE_DIR}/pv/prop/enum.cpp
4e5a4405
JH
42 ${PROJECT_SOURCE_DIR}/pv/prop/int.cpp
43 ${PROJECT_SOURCE_DIR}/pv/prop/property.cpp
44 ${PROJECT_SOURCE_DIR}/pv/prop/string.cpp
4ce6b5e7 45 ${PROJECT_SOURCE_DIR}/pv/popups/channels.cpp
3b3a445c
JH
46 ${PROJECT_SOURCE_DIR}/pv/view/analogsignal.cpp
47 ${PROJECT_SOURCE_DIR}/pv/view/cursor.cpp
48 ${PROJECT_SOURCE_DIR}/pv/view/cursorpair.cpp
8914fe79 49 ${PROJECT_SOURCE_DIR}/pv/view/flag.cpp
3b3a445c 50 ${PROJECT_SOURCE_DIR}/pv/view/header.cpp
3b3a445c 51 ${PROJECT_SOURCE_DIR}/pv/view/marginwidget.cpp
4ce6b5e7
UH
52 ${PROJECT_SOURCE_DIR}/pv/view/logicsignal.cpp
53 ${PROJECT_SOURCE_DIR}/pv/view/rowitem.cpp
54 ${PROJECT_SOURCE_DIR}/pv/view/rowitemowner.cpp
3b3a445c 55 ${PROJECT_SOURCE_DIR}/pv/view/ruler.cpp
3b3a445c 56 ${PROJECT_SOURCE_DIR}/pv/view/signal.cpp
3a54cb68 57 ${PROJECT_SOURCE_DIR}/pv/view/timeitem.cpp
3b3a445c
JH
58 ${PROJECT_SOURCE_DIR}/pv/view/timemarker.cpp
59 ${PROJECT_SOURCE_DIR}/pv/view/trace.cpp
4ce6b5e7 60 ${PROJECT_SOURCE_DIR}/pv/view/tracegroup.cpp
3b3a445c
JH
61 ${PROJECT_SOURCE_DIR}/pv/view/tracepalette.cpp
62 ${PROJECT_SOURCE_DIR}/pv/view/view.cpp
26e3af6b 63 ${PROJECT_SOURCE_DIR}/pv/view/viewitem.cpp
5b5fa4da 64 ${PROJECT_SOURCE_DIR}/pv/view/viewitempaintparams.cpp
3b3a445c 65 ${PROJECT_SOURCE_DIR}/pv/view/viewport.cpp
40aca27e 66 ${PROJECT_SOURCE_DIR}/pv/view/viewwidget.cpp
3b3a445c
JH
67 ${PROJECT_SOURCE_DIR}/pv/widgets/colourbutton.cpp
68 ${PROJECT_SOURCE_DIR}/pv/widgets/colourpopup.cpp
69 ${PROJECT_SOURCE_DIR}/pv/widgets/popup.cpp
4ce6b5e7
UH
70 ${PROJECT_SOURCE_DIR}/pv/widgets/popuptoolbutton.cpp
71 ${PROJECT_SOURCE_DIR}/pv/widgets/sweeptimingwidget.cpp
3b3a445c 72 ${PROJECT_SOURCE_DIR}/pv/widgets/wellarray.cpp
f3d66e52
JH
73 data/analogsegment.cpp
74 data/logicsegment.cpp
fb746bcc
AG
75 test.cpp
76)
77
0aad432c 78# This list includes only QObject derived class headers.
3b3a445c 79set(pulseview_TEST_HEADERS
f65cd27b 80 ${PROJECT_SOURCE_DIR}/pv/session.hpp
4ce6b5e7 81 ${PROJECT_SOURCE_DIR}/pv/storesession.hpp
3cc9ad7b 82 ${PROJECT_SOURCE_DIR}/pv/binding/device.hpp
476f9ebf 83 ${PROJECT_SOURCE_DIR}/pv/devices/device.hpp
4ce6b5e7
UH
84 ${PROJECT_SOURCE_DIR}/pv/popups/channels.hpp
85 ${PROJECT_SOURCE_DIR}/pv/popups/deviceoptions.hpp
86 ${PROJECT_SOURCE_DIR}/pv/prop/bool.hpp
2acdb232
JH
87 ${PROJECT_SOURCE_DIR}/pv/prop/double.hpp
88 ${PROJECT_SOURCE_DIR}/pv/prop/enum.hpp
89 ${PROJECT_SOURCE_DIR}/pv/prop/int.hpp
90 ${PROJECT_SOURCE_DIR}/pv/prop/property.hpp
91 ${PROJECT_SOURCE_DIR}/pv/prop/string.hpp
2acdb232 92 ${PROJECT_SOURCE_DIR}/pv/view/cursor.hpp
8914fe79 93 ${PROJECT_SOURCE_DIR}/pv/view/flag.hpp
2acdb232
JH
94 ${PROJECT_SOURCE_DIR}/pv/view/header.hpp
95 ${PROJECT_SOURCE_DIR}/pv/view/logicsignal.hpp
96 ${PROJECT_SOURCE_DIR}/pv/view/marginwidget.hpp
4ce6b5e7 97 ${PROJECT_SOURCE_DIR}/pv/view/rowitem.hpp
2acdb232 98 ${PROJECT_SOURCE_DIR}/pv/view/ruler.hpp
2acdb232 99 ${PROJECT_SOURCE_DIR}/pv/view/signal.hpp
3a54cb68 100 ${PROJECT_SOURCE_DIR}/pv/view/timeitem.hpp
2acdb232
JH
101 ${PROJECT_SOURCE_DIR}/pv/view/timemarker.hpp
102 ${PROJECT_SOURCE_DIR}/pv/view/trace.hpp
4ce6b5e7 103 ${PROJECT_SOURCE_DIR}/pv/view/tracegroup.hpp
2acdb232 104 ${PROJECT_SOURCE_DIR}/pv/view/view.hpp
26e3af6b 105 ${PROJECT_SOURCE_DIR}/pv/view/viewitem.hpp
2acdb232 106 ${PROJECT_SOURCE_DIR}/pv/view/viewport.hpp
40aca27e 107 ${PROJECT_SOURCE_DIR}/pv/view/viewwidget.hpp
2acdb232
JH
108 ${PROJECT_SOURCE_DIR}/pv/widgets/colourbutton.hpp
109 ${PROJECT_SOURCE_DIR}/pv/widgets/colourpopup.hpp
110 ${PROJECT_SOURCE_DIR}/pv/widgets/popup.hpp
4ce6b5e7
UH
111 ${PROJECT_SOURCE_DIR}/pv/widgets/popuptoolbutton.hpp
112 ${PROJECT_SOURCE_DIR}/pv/widgets/sweeptimingwidget.hpp
2acdb232 113 ${PROJECT_SOURCE_DIR}/pv/widgets/wellarray.hpp
3b3a445c
JH
114)
115
269528f5
JH
116if(ENABLE_DECODE)
117 list(APPEND pulseview_TEST_SOURCES
3cc9ad7b 118 ${PROJECT_SOURCE_DIR}/pv/binding/decoder.cpp
269528f5 119 ${PROJECT_SOURCE_DIR}/pv/data/decoderstack.cpp
269528f5 120 ${PROJECT_SOURCE_DIR}/pv/data/decode/annotation.cpp
d0710d1e
JH
121 ${PROJECT_SOURCE_DIR}/pv/data/decode/decoder.cpp
122 ${PROJECT_SOURCE_DIR}/pv/data/decode/row.cpp
123 ${PROJECT_SOURCE_DIR}/pv/data/decode/rowdata.cpp
269528f5
JH
124 ${PROJECT_SOURCE_DIR}/pv/view/decodetrace.cpp
125 ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.cpp
126 ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.cpp
127 data/decoderstack.cpp
128 )
129
130 list(APPEND pulseview_TEST_HEADERS
2acdb232
JH
131 ${PROJECT_SOURCE_DIR}/pv/data/decoderstack.hpp
132 ${PROJECT_SOURCE_DIR}/pv/view/decodetrace.hpp
133 ${PROJECT_SOURCE_DIR}/pv/widgets/decodergroupbox.hpp
134 ${PROJECT_SOURCE_DIR}/pv/widgets/decodermenu.hpp
269528f5
JH
135 )
136endif()
137
226a1527
UH
138if(Qt5Core_FOUND)
139 qt5_wrap_cpp(pulseview_TEST_HEADERS_MOC ${pulseview_TEST_HEADERS})
140else()
0661570b
UH
141 # Workaroud for QTBUG-22829: -DBOOST_NEXT_PRIOR_HPP_INCLUDED.
142 # https://bugreports.qt.io/browse/QTBUG-22829
143 qt4_wrap_cpp(pulseview_TEST_HEADERS_MOC ${pulseview_TEST_HEADERS}
144 OPTIONS -DBOOST_NEXT_PRIOR_HPP_INCLUDED)
226a1527 145 include(${QT_USE_FILE})
269528f5
JH
146endif()
147
a9a88468
UH
148# On MinGW we need to use static linking.
149if(NOT WIN32)
858ae630 150 add_definitions(-DBOOST_TEST_DYN_LINK)
a9a88468
UH
151endif()
152
fb746bcc
AG
153add_executable(pulseview-test
154 ${pulseview_TEST_SOURCES}
3b3a445c 155 ${pulseview_TEST_HEADERS_MOC}
fb746bcc
AG
156)
157
158target_link_libraries(pulseview-test ${PULSEVIEW_LINK_LIBS})
159