-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
96 lines (79 loc) · 3.66 KB
/
CMakeLists.txt
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.12)
project(trigger VERSION 2.1.2)
find_package(daq-cmake REQUIRED)
daq_setup_environment()
find_package(ers REQUIRED)
find_package(Boost COMPONENTS iostreams unit_test_framework REQUIRED)
find_package(serialization REQUIRED)
find_package(logging REQUIRED)
find_package(appfwk REQUIRED)
find_package(triggeralgs REQUIRED)
find_package(dfmessages REQUIRED)
find_package(utilities REQUIRED)
find_package(iomanager REQUIRED)
find_package(daqdataformats REQUIRED)
find_package(detdataformats REQUIRED)
find_package(trgdataformats REQUIRED)
find_package(detchannelmaps REQUIRED)
find_package(hdf5libs REQUIRED)
find_package(datahandlinglibs REQUIRED)
find_package(appmodel REQUIRED)
find_package(CLI11 REQUIRED)
daq_protobuf_codegen( opmon/*.proto )
##############################################################################
# Main library
set(TRIGGER_DEPENDENCIES
appmodel::appmodel
appfwk::appfwk
logging::logging
dfmessages::dfmessages
triggeralgs::triggeralgs
utilities::utilities
iomanager::iomanager
detdataformats::detdataformats
trgdataformats::trgdataformats
hdf5libs::hdf5libs
Boost::iostreams # Boost::iostreams comes in via datahandlinglibs
detchannelmaps::detchannelmaps
datahandlinglibs::datahandlinglibs)
daq_add_library(
*.cpp
LINK_LIBRARIES ${TRIGGER_DEPENDENCIES}
)
##############################################################################
# Codegen
## As a one liner, this call is a major source of git conflicts due to
## us all changing it. Please keep one file per line to give git
## merge a chance to succeed.
daq_codegen(
triggerprimitivemaker.jsonnet
TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 )
#daq_codegen(
# txbuffer.jsonnet DEP_PKGS datahandlinglibs TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 )
##############################################################################
# Plugins
daq_add_plugin(DataSubscriberModule duneDAQModule LINK_LIBRARIES trigger)
daq_add_plugin(TriggerDataHandlerModule duneDAQModule LINK_LIBRARIES trigger)
daq_add_plugin(RandomTCMakerModule duneDAQModule LINK_LIBRARIES trigger)
daq_add_plugin(MLTModule duneDAQModule LINK_LIBRARIES trigger)
daq_add_plugin(TriggerPrimitiveMaker duneDAQModule LINK_LIBRARIES trigger)
# Algorithm plugins
#daq_add_plugin(TriggerDecisionMakerSupernovaPlugin duneTDMaker LINK_LIBRARIES trigger)
##############################################################################
# Integration tests
daq_add_application( set_serialization_speed set_serialization_speed.cxx TEST LINK_LIBRARIES trigger)
daq_add_application( taset_serialization taset_serialization.cxx TEST LINK_LIBRARIES trigger)
daq_add_application( print_trigger_type print_trigger_type.cxx TEST LINK_LIBRARIES trigger hdf5libs::hdf5libs CLI11::CLI11)
daq_add_application( print_ds_fragments print_ds_fragments.cxx TEST LINK_LIBRARIES trigger hdf5libs::hdf5libs CLI11::CLI11)
daq_add_application( generate_tpset_from_hdf5 generate_tpset_from_hdf5.cxx TEST LINK_LIBRARIES trigger hdf5libs::hdf5libs CLI11::CLI11)
##############################################################################
# Unit Tests
#daq_add_unit_test(TokenManager_test LINK_LIBRARIES trigger)
#daq_add_unit_test(TxSet_test LINK_LIBRARIES trigger)
#daq_add_unit_test(BufferManager_test LINK_LIBRARIES trigger)
#daq_add_unit_test(TriggerZipper_test LINK_LIBRARIES trigger)
#daq_add_unit_test(TriggerObjectOverlay_test LINK_LIBRARIES trigger)
#daq_add_unit_test(AlgorithmPlugins_test LINK_LIBRARIES trigger)
daq_add_unit_test(TriggerTypeAdapters_test LINK_LIBRARIES trigger)
##############################################################################
daq_install()