CMakeLists.txt 6.37 KB
Newer Older
1
2
3
#Create a library called "libL1" which includes the source files given in
#the array.
#The extension is already found.Any number of sources could be listed here.
4

5
6
# extra warnings to examine the code
#ADD_DEFINITIONS(-Wall -Wextra -Wshadow -Weffc++)
7

8
9
# L1 defines
ADD_DEFINITIONS(-DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS)
10

Sergey Gorbunov's avatar
Sergey Gorbunov committed
11
12
13
14
15
16
17
18
IF (SSE_FOUND)
  ADD_DEFINITIONS(-DHAVE_SSE)
  Message(STATUS "L1 will be compiled with SSE support")
ELSE (SSE_FOUND)
  Message(FATAL_ERROR "L1 can not be compiled without SSE support")
ENDIF (SSE_FOUND)


19
20
21
22
23
24
25
26
Set(INCLUDE_DIRECTORIES
${CBMROOT_SOURCE_DIR}/reco/base
${CBMROOT_SOURCE_DIR}/reco/detectors/sts
${CBMROOT_SOURCE_DIR}/reco/detectors/rich
${CBMROOT_SOURCE_DIR}/reco/detectors/rich/fitter
${CBMBASE_DIR} 

${CBMDATA_DIR}
27
${CBMDATA_DIR}/raw
28
29
30
31
32
33
34
35
${CBMDATA_DIR}/sts
${CBMDATA_DIR}/much
${CBMDATA_DIR}/mvd
${CBMDATA_DIR}/trd
${CBMDATA_DIR}/tof
${CBMDATA_DIR}/rich
${CBMDATA_DIR}/global

36
37
${CBMROOT_SOURCE_DIR}/core/qa

38
39
40
41
42
43
44
45
46
47
48
${CBMROOT_SOURCE_DIR}/rich/reco/fitter

${CBMROOT_SOURCE_DIR}/reco/L1
${CBMROOT_SOURCE_DIR}/reco/L1/L1Algo
${CBMROOT_SOURCE_DIR}/reco/L1/OffLineInterface
${CBMROOT_SOURCE_DIR}/reco/L1/ParticleFinder

${CBMROOT_SOURCE_DIR}/reco/KF
${CBMROOT_SOURCE_DIR}/reco/KF/KFQA
${CBMROOT_SOURCE_DIR}/reco/KF/Interface
${CBMROOT_SOURCE_DIR}/run
49
50
51
${CBMROOT_SOURCE_DIR}/sim/transport/steer
${CBMROOT_SOURCE_DIR}/sim/transport/geosetup

52
${CBMDATA_DIR}
53
${CBMDATA_DIR}/base
54
55
56
57

  ${CBMDETECTORBASE_DIR}/sts

${CBMROOT_SOURCE_DIR}/mvd
58
  ${CBMDETECTORBASE_DIR}/trd
59
60
61
62
63
64
65
66
67
68
69
  ${CBMDETECTORBASE_DIR}/much
  ${CBMDETECTORBASE_DIR}/tof
)

Include_Directories( ${INCLUDE_DIRECTORIES})

Set(SYSTEM_INCLUDE_DIRECTORIES
  ${BASE_INCLUDE_DIRECTORIES} 
  ${KFParticle_INCLUDE_DIR}
)

Administrator's avatar
Administrator committed
70
71
72
73
74
75
76
if (OPENMP_FOUND)
  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  set(SYSTEM_INCLUDE_DIRECTORIES
    ${SYSTEM_INCLUDE_DIRECTORIES}
    ${OpenMP_CXX_INCLUDE_DIRS}
  )
Administrator's avatar
Administrator committed
77
78
endif()

79
80
81
82
83
Include_Directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})

set(LINK_DIRECTORIES
${KFParticle_LIB_DIR}
${FAIRROOT_LIBRARY_DIR}
84
${ROOT_LIBRARY_DIR}
85
86
${Boost_LIBRARY_DIRS}
)
Administrator's avatar
Administrator committed
87
88
89
90
91
92
93
94

if (OPENMP_FOUND AND APPLE)
  get_filename_component(OpenMP_CXX_LIBRARY_DIR ${OpenMP_CXX_LIBRARIES} DIRECTORY)
  Set(LINK_DIRECTORIES
    ${LINK_DIRECTORIES}
    ${OpenMP_CXX_LIBRARY_DIR}
  )
endif()
95
96
97
98
99
 
link_directories( ${LINK_DIRECTORIES})


set(SRCS
100
101
102
#L1Algo / L1CATrackFinder.cxx
#CbmL1Performance.cxx
#CbmL1ReadEvent.cxx
103
104
105
#CbmL1CATrdTrackFinderSA.cxx 
CbmL1TrdTracklet.cxx 
CbmL1TrdTracklet4.cxx 
106
CbmL1.cxx
107
108
109
110
111
112
113
#CbmL1TrdTrackFinderSts.cxx 
CbmL1TrackMerger.cxx 
CbmL1TofMerger.cxx
L1AlgoInputData.cxx
OffLineInterface/CbmL1RichENNRingFinder.cxx
OffLineInterface/CbmL1RichENNRingFinderParallel.cxx 
OffLineInterface/CbmL1StsTrackFinder.cxx 
114
115
116
117
118
119
120
121
122
123
OffLineInterface/CbmL1GlobalTrackFinder.cxx 
OffLineInterface/CbmL1GlobalFindTracksEvents.cxx
#OffLineInterface / CbmL1MuchFinder.cxx
#OffLineInterface / CbmL1MuchHit.cxx
#OffLineInterface / CbmL1MuchTrack.cxx
#OffLineInterface / CbmL1MuchFinderQa.cxx
OffLineInterface/CbmL1RichRingQa.cxx
#OffLineInterface / CbmL1SttHit.cxx
#OffLineInterface / CbmL1SttTrackFinder.cxx
#OffLineInterface / CbmL1SttTrack.cxx 
124
125
126
127
128
129
130
131
132
133
134
135
136
137

L1Algo/L1Algo.cxx
L1Algo/L1CATrackFinder.cxx
L1Algo/L1TrackExtender.cxx
L1Algo/L1TrackFitter.cxx
L1Algo/L1CAMergeClones.cxx
L1Algo/L1HitsSortHelper.cxx
L1Algo/L1Grid.cxx
CbmL1Performance.cxx 
CbmL1ReadEvent.cxx
L1Algo/L1TrackParFit.cxx
L1Algo/L1Event.cxx
L1Algo/L1EventMatch.cxx
L1Algo/L1MCEvent.cxx
138
L1Algo/L1Fit.cxx
139
140
CbmL1MCTrack.cxx

Sergey Gorbunov's avatar
Sergey Gorbunov committed
141
L1Algo/utils/L1AlgoDraw.cxx
142
143
L1Algo/utils/L1AlgoEfficiencyPerformance.cxx
L1Algo/utils/L1AlgoPulls.cxx
Sergey Gorbunov's avatar
Sergey Gorbunov committed
144

145
146
147
148
149
150
151
152
153
ParticleFinder/CbmL1PFFitter.cxx
ParticleFinder/CbmL1PFMCParticle.cxx
)

set(HEADERS
CbmL1CATrdTrackFinderSA.h
CbmL1.h
CbmL1MCTrack.h
CbmL1MCPoint.h
Sergey Gorbunov's avatar
Sergey Gorbunov committed
154
CbmL1Hit.h
155
156
157
158
159
160
161
162
163
CbmL1TofMerger.h
CbmL1Track.h
CbmL1TrackMerger.h
CbmL1TrackPar.h
CbmL1TrdHit.h
#CbmL1TrdTrackFinderSts.h
CbmL1TrdTracklet4.h
CbmL1TrdTracklet.h
CbmL1Vtx.h
164
165
166
167
#OffLineInterface / CbmL1MuchFinder.h
#OffLineInterface / CbmL1MuchFinderQa.h
#OffLineInterface / CbmL1MuchHit.h
#OffLineInterface / CbmL1MuchTrack.h
168
169
170
OffLineInterface/CbmL1RichENNRingFinder.h
OffLineInterface/CbmL1RichRingQa.h
OffLineInterface/CbmL1StsTrackFinder.h
171
172
173
174
175
OffLineInterface/CbmL1GlobalTrackFinder.h
OffLineInterface/CbmL1GlobalFindTracksEvents.h
#OffLineInterface / CbmL1SttHit.h
#OffLineInterface / CbmL1SttTrackFinder.h
#OffLineInterface / CbmL1SttTrack.h
Sergey Gorbunov's avatar
Sergey Gorbunov committed
176
L1Algo/L1Def.h
177
L1Algo/L1Vector.h
178
179
180
181
182
183
)




If(APPLE)
184
  ADD_DEFINITIONS(-Wall -Wsign-promo -Wctor-dtor-privacy -Wreorder -Wno-deprecated -Wno-parentheses) #   -Weffc++ -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast : wait for other parts of cbmroot\root.
185
#-- - Check for compiler flags
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
  CHECK_CXX_COMPILER_FLAG("-Wno-pmf-conversions" HAS_PMF)
  If(HAS_PMF)
    ADD_DEFINITIONS(-Wno-pmf-conversions)
  EndIf()
  CHECK_CXX_COMPILER_FLAG("-Wstrict-null-sentinel" HAS_SENTINEL)
  If(HAS_SENTINEL)
    ADD_DEFINITIONS(-Wstrict-null-sentinel)
  EndIf()
  CHECK_CXX_COMPILER_FLAG("-Wno-non-template-friend" HAS_TEMPLATE_FRIEND)
  If(HAS_TEMPLATE_FRIEND)
    ADD_DEFINITIONS(-Wno-non-template-friend)
  EndIf()


Else()
  
202
  ADD_DEFINITIONS(-Wall -Wsign-promo  -Wno-pmf-conversions -Wctor-dtor-privacy -Wreorder -Wno-deprecated -Wstrict-null-sentinel -Wno-non-template-friend -Wno-parentheses) #   -Weffc++ -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast : wait for other parts of cbmroot\root. 
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

EndIf()


IF (SSE_FOUND)
  ADD_DEFINITIONS(-DHAVE_SSE)
  SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS 
  "-msse -O3")
  Message(STATUS "L1 will be compiled with SSE support")
ELSE (SSE_FOUND)
  Message(STATUS "L1 will be compiled without SSE support")
  SET_SOURCE_FILES_PROPERTIES(${SRCS} PROPERTIES COMPILE_FLAGS 
  "-O3")
ENDIF (SSE_FOUND)

218
219
Set(LINKDEF L1LinkDef.h)

220
Set(LIBRARY_NAME L1)
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

Set(DEPENDENCIES
    KF
    Base
    CbmBase
    CbmData
#    CbmSimSteer
#    CbmGeoSetup
    CbmMuchBase
    CbmTrdBase
    CbmStsBase
    CbmRecoBase
    CbmRecoSts
    boost_regex
   )

Administrator's avatar
Administrator committed
237
if (OPENMP_FOUND AND APPLE)
238
  Set(DEPENDENCIES ${DEPENDENCIES} ${OpenMP_CXX_LIBRARIES}
Administrator's avatar
Administrator committed
239
240
  )
endif()
241
242
243

GENERATE_LIBRARY()

244
Install(FILES CbmL1Counters.h
245
              L1Algo/L1EventEfficiencies.h
246
              vectors/vec_arithmetic.h
247
248
        DESTINATION include
       )
249
250
251
252
253
254
255
256
257
258
259

Install(FILES L1Algo/L1Algo.h
              L1Algo/L1Branch.h
              L1Algo/L1Field.h
              L1Algo/L1Hit.h
        DESTINATION include/L1Algo
       )

Install(FILES vectors/P4_F32vec4.h
        DESTINATION include/vectors
       )