-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
142 lines (122 loc) · 5.41 KB
/
CMakeLists.txt
File metadata and controls
142 lines (122 loc) · 5.41 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization or
# submit itself to any jurisdiction.
if(pythia6_FOUND)
set(pythia6Target ROOT::EGPythia6 MC::Pythia6)
endif()
if(pythia_FOUND)
set(pythiaTarget MC::Pythia)
endif()
if(HepMC3_FOUND)
set(hepmcTarget MC::HepMC3)
endif()
o2_add_library(Generators
SOURCES src/Generator.cxx
src/Trigger.cxx
src/TriggerParticle.cxx
src/GeneratorTGenerator.cxx
src/GeneratorExternalParam.cxx
src/GeneratorFromFile.cxx
src/PDG.cxx
src/PrimaryGenerator.cxx
src/InteractionDiamondParam.cxx
src/TriggerExternalParam.cxx
src/TriggerParticleParam.cxx
src/BoxGunParam.cxx
src/QEDGenParam.cxx
src/GenCosmicsParam.cxx
src/GeneratorFactory.cxx
$<$<BOOL:${pythia6_FOUND}>:src/GeneratorPythia6.cxx>
$<$<BOOL:${pythia6_FOUND}>:src/GeneratorPythia6Param.cxx>
$<$<BOOL:${pythia_FOUND}>:src/GeneratorPythia8.cxx>
$<$<BOOL:${pythia_FOUND}>:src/DecayerPythia8.cxx>
$<$<BOOL:${pythia_FOUND}>:src/GeneratorPythia8Param.cxx>
$<$<BOOL:${pythia_FOUND}>:src/DecayerPythia8Param.cxx>
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMC.cxx>
$<$<BOOL:${HepMC3_FOUND}>:src/GeneratorHepMCParam.cxx>
PUBLIC_LINK_LIBRARIES FairRoot::Base O2::SimConfig O2::CommonUtils
O2::SimulationDataFormat ${pythia6Target} ${pythiaTarget} ${hepmcTarget}
FairRoot::Gen
TARGETVARNAME targetName)
if(pythia6_FOUND)
target_compile_definitions(${targetName} PUBLIC GENERATORS_WITH_PYTHIA6)
endif()
if(pythia_FOUND)
target_compile_definitions(${targetName} PUBLIC GENERATORS_WITH_PYTHIA8)
endif()
if(HepMC3_FOUND)
target_compile_definitions(${targetName} PUBLIC GENERATORS_WITH_HEPMC3)
endif()
set(headers
include/Generators/Generator.h
include/Generators/Trigger.h
include/Generators/TriggerParticle.h
include/Generators/GeneratorTGenerator.h
include/Generators/GeneratorExternalParam.h
include/Generators/GeneratorFromFile.h
include/Generators/PDG.h
include/Generators/PrimaryGenerator.h
include/Generators/InteractionDiamondParam.h
include/Generators/TriggerExternalParam.h
include/Generators/TriggerParticleParam.h
include/Generators/BoxGunParam.h
include/Generators/QEDGenParam.h
include/Generators/GenCosmicsParam.h)
if (pythia6_FOUND)
list(APPEND headers include/Generators/GeneratorPythia6.h
include/Generators/GeneratorPythia6Param.h)
endif()
if(pythia_FOUND)
list(APPEND headers
include/Generators/GeneratorPythia8.h
include/Generators/DecayerPythia8.h
include/Generators/GeneratorPythia8Param.h
include/Generators/DecayerPythia8Param.h
include/Generators/GeneratorFactory.h)
endif()
if(HepMC3_FOUND)
list(APPEND headers include/Generators/GeneratorHepMC.h)
list(APPEND headers include/Generators/GeneratorHepMCParam.h)
endif()
o2_target_root_dictionary(Generators HEADERS ${headers})
o2_add_test_root_macro(share/external/extgen.C
PUBLIC_LINK_LIBRARIES O2::Generators FairRoot::Base
LABELS generators COMPILE_ONLY)
if(pythia6_FOUND)
o2_add_test_root_macro(share/external/pythia6.C
PUBLIC_LINK_LIBRARIES O2::Generators
LABELS generators COMPILE_ONLY)
endif()
if(doBuildSimulation)
o2_add_test_root_macro(share/external/QEDLoader.C
PUBLIC_LINK_LIBRARIES O2::Generators
O2::SimConfig
LABELS generators)
o2_add_test_root_macro(share/external/GenCosmicsLoader.C
PUBLIC_LINK_LIBRARIES O2::Generators
O2::SimConfig
LABELS generators)
endif()
o2_add_test_root_macro(share/external/tgenerator.C
PUBLIC_LINK_LIBRARIES O2::Generators
LABELS generators)
o2_add_test_root_macro(share/external/trigger_multiplicity.C
PUBLIC_LINK_LIBRARIES O2::Generators
LABELS generators)
if(pythia_FOUND)
o2_add_test_root_macro(share/external/trigger_mpi.C
PUBLIC_LINK_LIBRARIES O2::Generators
LABELS generators)
o2_add_test_root_macro(share/egconfig/pythia8_userhooks_charm.C
PUBLIC_LINK_LIBRARIES O2::Generators
LABELS generators)
endif()
o2_data_file(COPY share/external DESTINATION Generators)
o2_data_file(COPY share/egconfig DESTINATION Generators)
o2_data_file(COPY share/pythia8 DESTINATION Generators)