Skip to content

Commit 002c911

Browse files
committed
[roc] PDA is required
1 parent b1b8ac3 commit 002c911

File tree

1 file changed

+62
-73
lines changed

1 file changed

+62
-73
lines changed

CMakeLists.txt

Lines changed: 62 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ find_package(Common REQUIRED)
8484
find_package(Configuration REQUIRED)
8585
find_package(Monitoring REQUIRED)
8686
find_package(InfoLogger REQUIRED)
87-
find_package(PDA)
87+
find_package(PDA REQUIRED)
8888

8989
####################################
9090
# RPATH
@@ -133,32 +133,30 @@ add_library(ReadoutCard SHARED
133133
)
134134

135135
# Add sources requiring PDA
136-
if(PDA_FOUND)
137-
target_sources(ReadoutCard PRIVATE
138-
src/DmaChannelPdaBase.cxx
139-
src/BarInterfaceBase.cxx
140-
src/CardConfigurator.cxx
141-
src/CardFinder.cxx
142-
src/Crorc/Crorc.cxx
143-
src/Crorc/CrorcDmaChannel.cxx
144-
src/Crorc/CrorcBar.cxx
145-
src/Cru/Common.cxx
146-
src/Cru/CruDmaChannel.cxx
147-
src/Cru/CruBar.cxx
148-
src/Cru/DatapathWrapper.cxx
149-
src/Cru/Eeprom.cxx
150-
src/Cru/Gbt.cxx
151-
src/Cru/I2c.cxx
152-
src/Cru/PatternPlayer.cxx
153-
src/Cru/Ttc.cxx
154-
src/Pda/PdaBar.cxx
155-
src/Pda/PdaDevice.cxx
156-
src/Pda/PdaDmaBuffer.cxx
157-
src/RocPciDevice.cxx
158-
$<$<BOOL:${Python2_FOUND}>:src/PythonInterface.cxx>
159-
$<$<BOOL:${Python3_FOUND}>:src/PythonInterface.cxx>
160-
)
161-
endif()
136+
target_sources(ReadoutCard PRIVATE
137+
src/DmaChannelPdaBase.cxx
138+
src/BarInterfaceBase.cxx
139+
src/CardConfigurator.cxx
140+
src/CardFinder.cxx
141+
src/Crorc/Crorc.cxx
142+
src/Crorc/CrorcDmaChannel.cxx
143+
src/Crorc/CrorcBar.cxx
144+
src/Cru/Common.cxx
145+
src/Cru/CruDmaChannel.cxx
146+
src/Cru/CruBar.cxx
147+
src/Cru/DatapathWrapper.cxx
148+
src/Cru/Eeprom.cxx
149+
src/Cru/Gbt.cxx
150+
src/Cru/I2c.cxx
151+
src/Cru/PatternPlayer.cxx
152+
src/Cru/Ttc.cxx
153+
src/Pda/PdaBar.cxx
154+
src/Pda/PdaDevice.cxx
155+
src/Pda/PdaDmaBuffer.cxx
156+
src/RocPciDevice.cxx
157+
$<$<BOOL:${Python2_FOUND}>:src/PythonInterface.cxx>
158+
$<$<BOOL:${Python3_FOUND}>:src/PythonInterface.cxx>
159+
)
162160

163161
target_include_directories(ReadoutCard
164162
PUBLIC
@@ -180,17 +178,12 @@ target_link_libraries(ReadoutCard
180178
$<$<BOOL:${Python3_FOUND}>:Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}>
181179
$<$<BOOL:${Python3_FOUND}>:Python3::Python>
182180
PRIVATE
183-
$<$<BOOL:${PDA_FOUND}>:pda::pda>
181+
pda::pda
184182
Boost::filesystem
185183
Boost::system
186184
pthread
187185
)
188186

189-
target_compile_definitions(ReadoutCard
190-
PRIVATE
191-
$<$<BOOL:${PDA_FOUND}>:ALICEO2_READOUTCARD_PDA_ENABLED>
192-
)
193-
194187
# Use C++17
195188
target_compile_features(ReadoutCard PUBLIC cxx_std_17)
196189

@@ -217,40 +210,39 @@ set(EXE_NAMES
217210
roc-reg-write
218211
)
219212

220-
if(PDA_FOUND)
221-
list(APPEND EXE_SRCS
222-
ProgramBarStress.cxx
223-
ProgramConfig.cxx
224-
ProgramCtpEmulator.cxx
225-
ProgramCleanup.cxx
226-
../Example.cxx
227-
ProgramFlash.cxx
228-
ProgramFlashRead.cxx
229-
ProgramListCards.cxx
230-
ProgramMetrics.cxx
231-
ProgramPacketMonitor.cxx
232-
ProgramPatternPlayer.cxx
233-
ProgramSiuStatus.cxx
234-
ProgramStatus.cxx
235-
ProgramTriggerMonitor.cxx
236-
)
237-
list(APPEND EXE_NAMES
238-
roc-bar-stress
239-
roc-config
240-
roc-ctp-emulator
241-
roc-cleanup
242-
roc-example
243-
roc-flash
244-
roc-flash-read
245-
roc-list-cards
246-
roc-metrics
247-
roc-pkt-monitor
248-
roc-pat-player
249-
roc-siu-status
250-
roc-status
251-
roc-trig-monitor
252-
)
253-
endif()
213+
list(APPEND EXE_SRCS
214+
ProgramBarStress.cxx
215+
ProgramConfig.cxx
216+
ProgramCtpEmulator.cxx
217+
ProgramCleanup.cxx
218+
../Example.cxx
219+
ProgramFlash.cxx
220+
ProgramFlashRead.cxx
221+
ProgramListCards.cxx
222+
ProgramMetrics.cxx
223+
ProgramPacketMonitor.cxx
224+
ProgramPatternPlayer.cxx
225+
ProgramSiuStatus.cxx
226+
ProgramStatus.cxx
227+
ProgramTriggerMonitor.cxx
228+
)
229+
230+
list(APPEND EXE_NAMES
231+
roc-bar-stress
232+
roc-config
233+
roc-ctp-emulator
234+
roc-cleanup
235+
roc-example
236+
roc-flash
237+
roc-flash-read
238+
roc-list-cards
239+
roc-metrics
240+
roc-pkt-monitor
241+
roc-pat-player
242+
roc-siu-status
243+
roc-status
244+
roc-trig-monitor
245+
)
254246

255247

256248
list(LENGTH EXE_SRCS count)
@@ -267,7 +259,7 @@ foreach(i RANGE ${count})
267259
PRIVATE
268260
ReadoutCard
269261
Boost::program_options
270-
$<$<BOOL:${PDA_FOUND}>:pda::pda>
262+
pda::pda
271263
)
272264
endforeach()
273265

@@ -280,6 +272,7 @@ enable_testing()
280272
set(TEST_SRCS
281273
test/TestChannelFactoryUtils.cxx
282274
test/TestChannelPaths.cxx
275+
test/TestCruBar.cxx
283276
test/TestCruDataFormat.cxx
284277
test/TestEnums.cxx
285278
test/TestInterprocessLock.cxx
@@ -291,10 +284,6 @@ set(TEST_SRCS
291284
test/TestSuperpageQueue.cxx
292285
)
293286

294-
if(PDA_FOUND)
295-
list(APPEND TEST_SRCS test/TestCruBar.cxx)
296-
endif()
297-
298287
foreach (test ${TEST_SRCS})
299288
get_filename_component(test_name ${test} NAME)
300289
string(REGEX REPLACE ".cxx" "" test_name ${test_name})
@@ -308,7 +297,7 @@ foreach (test ${TEST_SRCS})
308297
PRIVATE
309298
ReadoutCard
310299
Boost::unit_test_framework
311-
$<$<BOOL:${PDA_FOUND}>:pda::pda>
300+
pda::pda
312301
)
313302
add_test(NAME ${test_name} COMMAND ${test_name})
314303
set_tests_properties(${test_name} PROPERTIES TIMEOUT 15)

0 commit comments

Comments
 (0)