-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
54 lines (42 loc) · 2.27 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
cmake_minimum_required(VERSION 3.12)
project(lbrulibs VERSION 1.6.0)
find_package(daq-cmake REQUIRED)
daq_setup_environment()
find_package(appfwk REQUIRED)
find_package(logging REQUIRED)
find_package(ers REQUIRED)
find_package(detdataformats REQUIRED)
find_package(nddetdataformats REQUIRED)
find_package(readoutlibs REQUIRED)
find_package(ndreadoutlibs REQUIRED)
find_package(ipm REQUIRED)
find_package(iomanager REQUIRED)
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
daq_codegen(pacmancardreader.jsonnet TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 )
daq_codegen(pacmancardreaderinfo.jsonnet DEP_PKGS opmonlib TEMPLATES opmonlib/InfoStructs.hpp.j2 opmonlib/InfoNljs.hpp.j2 )
##############################################################################
# Dependency sets
set(DUNEDAQ_DEPENDENCIES appfwk::appfwk readoutlibs::readoutlibs ndreadoutlibs::ndreadoutlibs detdataformats::detdataformats nddetdataformats::nddetdataformats ipm::ipm iomanager::iomanager)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
##############################################################################
# Main library
daq_add_library(LINK_LIBRARIES ${DUNEDAQ_DEPENDENCIES})
##############################################################################
# Plugins
daq_add_plugin(PacmanCardReader duneDAQModule LINK_LIBRARIES ${DUNEDAQ_DEPENDENCIES} lbrulibs)
##############################################################################
# Integration tests
#daq_add_application(lbrulibs_test_something test_pacmansomething_app.cxx TEST LINK_LIBRARIES lbrulibs)
##############################################################################
# Test configurations
file(COPY test/pacmanreadout-commands.json DESTINATION test)
##############################################################################
# Unit Tests
daq_add_unit_test(ZMQPubSub_test LINK_LIBRARIES lbrulibs)
daq_add_unit_test(ZMQStream_test LINK_LIBRARIES lbrulibs)
daq_add_unit_test(PacmanFrame_test LINK_LIBRARIES lbrulibs)
##daq_add_unit_test(ZMQLink_test LINK_LIBRARIES lbrulibs)
#daq_add_unit_test(STREAMLink_test LINK_LIBRARIES lbrulibs)
##############################################################################
# Installation
daq_install()