forked from DUNE-DAQ/fdreadoutlibs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
81 lines (67 loc) · 2.59 KB
/
CMakeLists.txt
File metadata and controls
81 lines (67 loc) · 2.59 KB
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
cmake_minimum_required(VERSION 3.12)
project(fdreadoutlibs VERSION 1.6.2)
find_package(daq-cmake REQUIRED)
daq_setup_environment()
find_package(ers REQUIRED)
find_package(iomanager REQUIRED)
find_package(appfwk REQUIRED)
find_package(logging REQUIRED)
find_package(opmonlib REQUIRED)
find_package(readoutlibs REQUIRED)
find_package(daqdataformats REQUIRED)
find_package(detchannelmaps REQUIRED)
find_package(detdataformats REQUIRED)
find_package(trigger REQUIRED)
find_package(triggeralgs REQUIRED)
find_package(folly REQUIRED)
find_package(Boost COMPONENTS iostreams unit_test_framework REQUIRED)
set(BOOST_LIBS Boost::iostreams ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_LIBRARIES})
#daq_codegen( readoutconfig.jsonnet datalinkhandler.jsonnet datarecorder.jsonnet sourceemulatorconfig.jsonnet TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 )
#daq_codegen( *info.jsonnet DEP_PKGS opmonlib TEMPLATES opmonlib/InfoStructs.hpp.j2 opmonlib/InfoNljs.hpp.j2 )
##############################################################################
# Dependency sets
set(FDREADOUTLIBS_DEPENDENCIES
#tools
Folly::folly
ers::ers
logging::logging
#dunedaq
appfwk::appfwk
readoutlibs::readoutlibs
opmonlib::opmonlib
daqdataformats::daqdataformats
detdataformats::detdataformats
trigger::trigger
triggeralgs::triggeralgs
detchannelmaps::detchannelmaps
)
##############################################################################
# Extra options and tweaks
set(FDREADOUTLIBS_USE_INTRINSICS ON)
if(${FDREADOUTLIBS_USE_INTRINSICS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2")
endif()
##############################################################################
# Main library
daq_add_library(
*.cpp
wib/*.cpp
wib/tpg/*.cpp
wib2/*.cpp
wib2/tpg/*.cpp
wibeth/*.cpp
daphne/*.cpp
tde/*.cpp
LINK_LIBRARIES ${FDREADOUTLIBS_DEPENDENCIES}
)
##############################################################################
# Apps
daq_add_application(TDEFileCreator TDEFileCreator.cxx TEST LINK_LIBRARIES fdreadoutlibs)
daq_add_application(WIB2TestBench WIB2TestBench.cxx TEST LINK_LIBRARIES fdreadoutlibs)
daq_add_application(WIB2AddFakeHits WIB2AddFakeHits.cxx TEST LINK_LIBRARIES fdreadoutlibs hdf5libs::hdf5libs)
daq_add_application(WIB2BinaryFrameReader WIB2BinaryFrameReader.cxx TEST LINK_LIBRARIES fdreadoutlibs hdf5libs::hdf5libs)
##############################################################################
daq_add_unit_test(DAPHNEStreamSuperChunkTypeAdapter_test LINK_LIBRARIES fdreadoutlibs)
##############################################################################
# Installation
daq_install()