CMakeLists.txt 5.85 KB
Newer Older
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
dino's avatar
dino committed
2 3 4

PROJECT(femul)

5 6
# Type of build
set(CMAKE_BUILD_TYPE "Release")
dino's avatar
dino committed
7

8
# Where FIND_PACKAGE should search "non-distribution" FindXxxx.cmake
9 10
set(CMAKE_MODULE_PATH  ".")

11 12
# Select the off-line version of the actors
ADD_DEFINITIONS(-DNRV_TYPE=NRV_OFFLINE)
dino's avatar
dino committed
13

14 15 16
# Enable root
ADD_DEFINITIONS(-DTF_ROOTTREE)
FIND_PACKAGE(ROOT)
17 18
MESSAGE("Root Dirs: ${ROOT_INCLUDE_DIR}  ${ROOT_LIBRARY_DIR}")
MESSAGE("Root Libs: ${ROOT_LIBRARIES}")
19

20 21
# Find Boost
FIND_PACKAGE(Boost)
22 23 24
MESSAGE("Boost Dirs: ${Boost_INCLUDE_DIR} ${Boost_LIBRARY_DIRS}")
SET(BOOST_LIBRARIES "-L${Boost_LIBRARY_DIRS} -l:libboost_system.a -l:libboost_thread.a") 
MESSAGE("Boost Libs: ${BOOST_LIBRARIES}")
dino's avatar
dino committed
25

26
# For the vectorized version of the PSA FOM-loop
27 28
ADD_DEFINITIONS(-DUSE_SSE_VERSION)
SET(CMAKE_CXX_FLAGS "-msse4")
29 30

# The sources to build femul
31 32 33 34 35
SET(AGADIR "../..")
SET(ADFDIR "${AGADIR}/agaprodep/adf")
SET(ACTORS "${AGADIR}/agapro")
SET(PRISMA "${AGADIR}/agapro/PRISMA/src/lib_prisma")
SET(FEMDIR "${AGADIR}/agapro/WinCtest")
dino's avatar
 
dino committed
36

dino's avatar
dino committed
37
INCLUDE_DIRECTORIES(
38
${ACTORS}/WinCtest
dino's avatar
dino committed
39 40 41 42 43 44
${ACTORS}/common
${ACTORS}/producers/Crystal      ${ACTORS}/producers/Crystal/includeATCA
${ACTORS}/producers/AncillaryTCP
${ACTORS}/filters/Preprocessing  ${ACTORS}/filters/Preprocessing/includePrePSA
${ACTORS}/filters/Ancillary      ${ACTORS}/filters/Ancillary/includeVME
${ACTORS}/filters/PSA            ${ACTORS}/filters/PSA/includePSA
45 46
${ACTORS}/filters/PostPSA
${ACTORS}/filters/Global
dino's avatar
dino committed
47 48 49
${ACTORS}/filters/Tracking       ${ACTORS}/filters/Tracking/includeOFT  ${ACTORS}/filters/Tracking/includeMGT
${ACTORS}/builders
${ADFDIR}                        ${ADFDIR}/standalone
50
${AGADIR}/include
dino's avatar
dino committed
51
${PRISMA}/include
52
${Boost_INCLUDE_DIR}
dino's avatar
dino committed
53
/usr/include/skstream-0.3        /usr/lib/skstream-0.3/include
54
${ROOT_INCLUDE_DIR}
55 56
${ACTORS}/producers/Basic
${ACTORS}/consumers/Basic
dino's avatar
dino committed
57 58 59 60 61 62
)

SET(actors_SRCS
${ACTORS}/common/cycleServer.cpp
${ACTORS}/common/misc.cpp
${ACTORS}/common/mwdlib.cpp
63
${ACTORS}/common/adetParams.cpp
dino's avatar
dino committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77
${ACTORS}/producers/Crystal/CrystalProducer.cpp
${ACTORS}/producers/Crystal/CrystalProducerATCA.cpp
${ACTORS}/producers/Crystal/includeATCA/mezzanine.cpp
${ACTORS}/producers/Crystal/includeATCA/fileATCA.cpp
${ACTORS}/producers/AncillaryTCP/AncillaryProducerTCP.cpp
${ACTORS}/filters/Preprocessing/PreprocessingFilter.cpp
${ACTORS}/filters/Preprocessing/PreprocessingFilterPSA.cpp
${ACTORS}/filters/Ancillary/AncillaryFilter.cpp
${ACTORS}/filters/Ancillary/AncillaryFilterVME.cpp
${ACTORS}/filters/Ancillary/AncillaryFilterATCA.cpp 
${ACTORS}/filters/Ancillary/includeVME/Converter.cpp
${ACTORS}/filters/PSA/PSAFilter.cpp
${ACTORS}/filters/PSA/PSAFilterGridSearch.cpp
${ACTORS}/filters/PSA/includePSA/SignalBasis.cpp
78 79
${ACTORS}/filters/PostPSA/PostPSAFilter.cpp
${ACTORS}/filters/Global/GlobalFilter.cpp
dino's avatar
dino committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
${ACTORS}/filters/Tracking/TrackingFilter.cpp
${ACTORS}/filters/Tracking/TrackingFilterOFT.cpp
${ACTORS}/filters/Tracking/TrackingFilterMGT.cpp
${ACTORS}/filters/Tracking/includeOFT/tracking_cluster.c
${ACTORS}/filters/Tracking/includeOFT/tracking_data_manip.c
${ACTORS}/filters/Tracking/includeOFT/tracking_events.c
${ACTORS}/filters/Tracking/includeOFT/tracking_physics.c
${ACTORS}/filters/Tracking/includeOFT/tracking_utilitaires.c
${ACTORS}/filters/Tracking/includeMGT/mgt.c
${ACTORS}/filters/Tracking/includeMGT/mgt_eclust.c
${ACTORS}/filters/Tracking/includeMGT/mgt_etrack.c
${ACTORS}/filters/Tracking/includeMGT/mgt_event.c
${ACTORS}/filters/Tracking/includeMGT/mgt_geoagata.c
${ACTORS}/filters/Tracking/includeMGT/mgt_vectorlib.c
${ACTORS}/builders/EventBuilder.cpp
95
${ACTORS}/builders/EventQueue.cpp
dino's avatar
dino committed
96
)
97 98 99
IF(NOT WIN32)
 SET_SOURCE_FILES_PROPERTIES(${actors_SRCS} PROPERTIES LANGUAGE CXX)
ENDIF()
dino's avatar
dino committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116

SET(adf_SRCS
${ADFDIR}/ADFConfig.cpp
${ADFDIR}/ADFObjects.cpp
${ADFDIR}/AgataConfigurationFrame.cpp
${ADFDIR}/AgataFrameFactory.cpp
${ADFDIR}/AgataKeyFactory.cpp
${ADFDIR}/AgataRawFrame.cpp
${ADFDIR}/BaseBuffer.cpp
${ADFDIR}/BufferIO.cpp
${ADFDIR}/CompositeFrame.cpp
${ADFDIR}/ConfAgent.cpp
${ADFDIR}/ConfigurationFrame.cpp
${ADFDIR}/Counter.cpp
${ADFDIR}/CrystalFrame.cpp
${ADFDIR}/DataHandling.cpp
${ADFDIR}/DefaultKeyFactory.cpp
117 118
${ADFDIR}/DFAgent.cpp
${ADFDIR}/DotConf.cpp
dino's avatar
dino committed
119 120 121 122 123 124 125 126 127 128 129 130
${ADFDIR}/FactoryItem.cpp
${ADFDIR}/Frame.cpp
${ADFDIR}/FrameBlock.cpp
${ADFDIR}/FrameFactory.cpp
${ADFDIR}/FrameIO.cpp
${ADFDIR}/GenericFrame.cpp
${ADFDIR}/GObject.cpp
${ADFDIR}/Hits.cpp
${ADFDIR}/Key.cpp
${ADFDIR}/KeyFactory.cpp
${ADFDIR}/MetaFrame.cpp
${ADFDIR}/NarvalInterface.cpp
131
${ADFDIR}/RunAgent.cpp
dino's avatar
dino committed
132
${ADFDIR}/Signals.cpp
133
${ADFDIR}/TrackedFrame.cpp
dino's avatar
dino committed
134 135 136 137 138 139
${ADFDIR}/Trigger.cpp
${ADFDIR}/Version.cpp
${ADFDIR}/standalone/CentralLog.cpp
${ADFDIR}/standalone/LogCollector.cpp
${ADFDIR}/standalone/LogMessage.cpp
${ADFDIR}/BasicAFC.cpp
140 141
${ADFDIR}/BasicAFP.cpp
${ADFDIR}/DefaultFrameFactory.cpp
dino's avatar
dino committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
)

SET(PRISMA_SRCS
${PRISMA}/src/prismaManager.cc
${PRISMA}/src/banGate.cc
${PRISMA}/src/banManager.cc
${PRISMA}/src/calCoef.cc
${PRISMA}/src/calManager.cc
${PRISMA}/src/CGaspBuffer.cc
${PRISMA}/src/ConfigurationFile.cc
${PRISMA}/src/detData.cc 
${PRISMA}/src/fastSolver.cc
${PRISMA}/src/fullEvent.cc
${PRISMA}/src/massCalculator.cc
${PRISMA}/src/prismaIonCh.cc
${PRISMA}/src/prismaMcp.cc
${PRISMA}/src/prismaPPAC.cc
${PRISMA}/src/prismaSide.cc
${PRISMA}/src/RandomGenerator.cc
${PRISMA}/src/Vectors.cc
${PRISMA}/src/zedCalculator.cc
)

165
SET(femul_SRCS  ${FEMDIR}/femul.cpp ${FEMDIR}/ChainOfActors.cpp ${adf_SRCS}  ${actors_SRCS}  ${PRISMA_SRCS} )
166

167
#SET(LINK_DIRECTORIES ${Boost_LIBRARY_DIRS} ${ROOT_LIBRARY_DIR})
168
#MESSAGE("LINK_DIRECTORIES: ${LINK_DIRECTORIES}")
169
#LINK_DIRECTORIES( ${LINK_DIRECTORIES})
170

dino's avatar
dino committed
171
IF(WIN32)
172
 SET(LINK_LIBRARIES libboost_thread-mt.a  ${ROOT_LIBRARIES})
dino's avatar
dino committed
173
ELSE()
174
 SET(LINK_LIBRARIES ${BOOST_LIBRARIES} ${ROOT_LIBRARIES})
dino's avatar
dino committed
175
ENDIF()
176 177 178 179 180
#MESSAGE("LINK_LIBRARIES: ${LINK_LIBRARIES}")

ADD_EXECUTABLE(femul ${femul_SRCS})

TARGET_LINK_LIBRARIES(femul ${LINK_LIBRARIES})
dino's avatar
dino committed
181