Skip to content

Commit 7b01299

Browse files
committed
DataSampling exported to its own repo
1 parent b4695a0 commit 7b01299

File tree

2 files changed

+49
-43
lines changed

2 files changed

+49
-43
lines changed

CMakeLists.txt

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.2 FATAL_ERROR)
66

77
find_package(ZeroMQ REQUIRED)
8-
if(NOT ZeroMQ_INCLUDE_DIR)
8+
if (NOT ZeroMQ_INCLUDE_DIR)
99
set(ZeroMQ_INCLUDE_DIR ${ZEROMQ_INCLUDE_DIR})
1010
set(ZeroMQ_LIBRARIES ${ZEROMQ_LIBRARIES})
11-
endif()
11+
endif ()
1212

1313

1414
### CMP0025 Compiler id for Apple Clang is now AppleClang.
@@ -34,12 +34,12 @@ include(ReadoutDependencies)
3434
include(O2)
3535

3636
# Set the default build type to "RelWithDebInfo"
37-
if(NOT CMAKE_BUILD_TYPE)
37+
if (NOT CMAKE_BUILD_TYPE)
3838
set(CMAKE_BUILD_TYPE "RelWithDebInfo"
3939
CACHE
4040
STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Coverage."
4141
FORCE)
42-
endif(NOT CMAKE_BUILD_TYPE)
42+
endif (NOT CMAKE_BUILD_TYPE)
4343

4444
# Set the version number of your project here (format is MAJOR.MINOR.PATCHLEVEL - e.g. 1.0.0)
4545
set(VERSION_MAJOR "0")
@@ -67,24 +67,22 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -fPIC")
6767
# Module, library and executable definition
6868
####################################
6969

70-
link_o2_subproject(DataSampling)
71-
7270
set(MODULE_NAME "Readout")
7371

7472
O2_SETUP(NAME ${MODULE_NAME})
7573

7674
set(SRCS
77-
src/ConsumerStats.cxx
78-
src/ConsumerFileRecorder.cxx
79-
src/ConsumerDataChecker.cxx
80-
src/ConsumerDataSampling.cxx
81-
src/ConsumerFMQ.cxx
82-
src/ReadoutEquipment.cxx
83-
src/ReadoutEquipmentDummy.cxx
84-
src/ReadoutEquipmentRORC.cxx
85-
src/DataBlockAggregator.cxx
86-
src/mainReadout.cxx
87-
)
75+
src/ConsumerStats.cxx
76+
src/ConsumerFileRecorder.cxx
77+
src/ConsumerDataChecker.cxx
78+
src/ConsumerDataSampling.cxx
79+
# src/ConsumerFMQ.cxx
80+
src/ReadoutEquipment.cxx
81+
src/ReadoutEquipmentDummy.cxx
82+
src/ReadoutEquipmentRORC.cxx
83+
src/DataBlockAggregator.cxx
84+
src/mainReadout.cxx
85+
)
8886

8987
include_directories(
9088
${CMAKE_CURRENT_SOURCE_DIR}/../RORC/include
@@ -99,31 +97,37 @@ include_directories(
9997
)
10098

10199
add_library(
102-
objReadoutEquipment OBJECT
103-
src/ReadoutEquipment.cxx
104-
src/ReadoutEquipmentDummy.cxx
105-
src/ReadoutEquipmentRORC.cxx
100+
objReadoutEquipment OBJECT
101+
src/ReadoutEquipment.cxx
102+
src/ReadoutEquipmentDummy.cxx
103+
src/ReadoutEquipmentRORC.cxx
106104
)
107105
add_library(
108-
objReadoutAggregator OBJECT
109-
src/DataBlockAggregator.cxx
106+
objReadoutAggregator OBJECT
107+
src/DataBlockAggregator.cxx
110108
)
109+
set(CONSUMERS_SRCS
110+
src/ConsumerStats.cxx
111+
src/ConsumerFileRecorder.cxx
112+
src/ConsumerDataChecker.cxx
113+
src/ConsumerDataSampling.cxx
114+
)
115+
if (FAIRROOT_FOUND)
116+
list(APPEND CONSUMERS_SRCS src/ConsumerFMQ.cxx)
117+
endif ()
111118
add_library(
112-
objReadoutConsumers OBJECT
113-
src/ConsumerStats.cxx
114-
src/ConsumerFileRecorder.cxx
115-
src/ConsumerDataChecker.cxx
116-
src/ConsumerDataSampling.cxx
117-
src/ConsumerFMQ.cxx
119+
objReadoutConsumers OBJECT
120+
${CONSUMERS_SRCS}
118121
)
119122

120123

121124
set(LIBRARY_NAME ${MODULE_NAME})
122125
set(BUCKET_NAME o2_readout_bucket)
123126

124-
if (FAIRROOT_FOUND AND ROOT_FOUND)
125-
set(BUCKET_NAME o2_readout_with_fair)
126-
endif()
127+
if (FAIRROOT_FOUND)
128+
list(APPEND SRCS src/ConsumerFMQ.cxx)
129+
set(BUCKET_NAME o2_readout_with_fair)
130+
endif ()
127131

128132
O2_GENERATE_LIBRARY()
129133

@@ -145,15 +149,15 @@ O2_GENERATE_EXECUTABLE(
145149
# TODO RECONSIDER THE THINGS BELOW AFTER EXTRACTION TO ITS OWN REPO
146150
# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
147151
get_directory_property(hasParent PARENT_DIRECTORY)
148-
if(hasParent)
152+
if (hasParent)
149153
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
150-
endif()
154+
endif ()
151155
include(PackageConfigurator)
152156

153157

154158
# Install some extra files
155159
install(
156-
FILES readout.cfg
157-
DESTINATION ${CMAKE_INSTALL_PREFIX}/etc
158-
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
160+
FILES readout.cfg
161+
DESTINATION ${CMAKE_INSTALL_PREFIX}/etc
162+
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
159163

cmake/ReadoutDependencies.cmake

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
find_package(Boost COMPONENTS unit_test_framework program_options REQUIRED)
1+
find_package(Boost COMPONENTS unit_test_framework program_options system REQUIRED)
22
find_package(Git QUIET)
33
find_package(FairRoot)
44
find_package(Monitoring REQUIRED)
55
find_package(Configuration REQUIRED)
66
find_package(Common REQUIRED)
77
find_package(InfoLogger REQUIRED)
88
find_package(ReadoutCard REQUIRED)
9+
find_package(DataSampling REQUIRED)
910

1011
if (FAIRROOT_FOUND)
1112
# this should go away when fairrot provides a proper Find script or proper config scripts
@@ -25,18 +26,23 @@ o2_define_bucket(
2526

2627
DEPENDENCIES
2728
pthread
28-
DataSampling
29+
${Boost_LOG_LIBRARY}
30+
${Boost_THREAD_LIBRARY}
31+
${Boost_SYSTEM_LIBRARY}
32+
${Boost_PROGRAM_OPTIONS_LIBRARY}
2933
${Configuration_LIBRARIES}
3034
${Monitoring_LIBRARIES}
3135
${Common_LIBRARIES}
3236
${InfoLogger_LIBRARIES}
3337
${ReadoutCard_LIBRARIES}
38+
${DataSampling_LIBRARIES}
3439

3540
SYSTEMINCLUDE_DIRECTORIES
3641
${Boost_INCLUDE_DIRS}
3742
${Monitoring_INCLUDE_DIRS}
3843
${InfoLogger_INCLUDE_DIRS}
3944
${ReadoutCard_INCLUDE_DIRS}
45+
${DataSampling_INCLUDE_DIRS}
4046
)
4147

4248

@@ -46,10 +52,6 @@ o2_define_bucket(
4652

4753
DEPENDENCIES
4854
o2_readout_bucket
49-
${Boost_PROGRAM_OPTIONS_LIBRARY}
50-
${Boost_LOG_LIBRARY}
51-
${Boost_THREAD_LIBRARY}
52-
${Boost_SYSTEM_LIBRARY}
5355
${FAIRROOT_LIBRARIES}
5456
${ROOT_LIBRARIES}
5557

0 commit comments

Comments
 (0)