forked from LArSoft/larsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
197 lines (177 loc) · 8.8 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# ======================================================================
# larsim main build file
#
# cd .../path/to/build/directory
# source .../path/to/larsim/ups/setup_for_development <-d|-p>
# buildtool [-I /install/path] -bt[i] -jN
# ======================================================================
# use cmake 3.14 or later
cmake_minimum_required (VERSION 3.12...3.14 FATAL_ERROR)
project(larsim LANGUAGES CXX)
# cetbuildtools contains our cmake modules
SET ( CETBUILDTOOLS_VERSION $ENV{CETBUILDTOOLS_VERSION} )
IF (NOT CETBUILDTOOLS_VERSION)
MESSAGE (FATAL_ERROR "ERROR: setup cetbuildtools to get the cmake modules")
ENDIF()
set(CMAKE_MODULE_PATH $ENV{CANVAS_ROOT_IO_DIR}/Modules
$ENV{CETBUILDTOOLS_DIR}/Modules
${CMAKE_MODULE_PATH})
include(CetCMakeEnv)
cet_cmake_env()
# -Wno-unused-variable needed because of CLHEP
cet_set_compiler_flags(DIAGS CAUTIOUS
WERROR
NO_UNDEFINED
EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-unused-variable
)
cet_report_compiler_flags()
# these are minimum required versions, not the actual product versions
find_ups_product( larcoreobj )
find_ups_product( larcorealg )
find_ups_product( larcore )
find_ups_product( lardataobj )
find_ups_product( lardataalg )
find_ups_product( lardata )
find_ups_product( larevt )
find_ups_product( marley )
find_ups_product( nutools )
find_ups_product(nug4)
find_ups_product( nugen )
find_ups_product( nurandom )
find_ups_product( nusimdata )
find_ups_product( art )
find_ups_product(art_root_io)
find_ups_product( cetbuildtools )
find_ups_geant4( geant4 )
find_ups_product( postgresql )
find_ups_product( ifdhc )
find_ups_product( genie )
find_ups_product( log4cpp )
find_ups_product( range )
# Wes put this here to use TRACE for debugging...
#find_ups_product( TRACE )
# Find all the libraries needed by our dependent CMakeList.txt files
cet_find_library( BOOST_SERIALIZATION NAMES boost_serialization PATHS ENV BOOST_LIB NO_DEFAULT_PATH )
cet_find_library( BOOST_DATE_TIME NAMES boost_date_time PATHS ENV BOOST_LIB NO_DEFAULT_PATH )
#
find_library( CRY NAMES CRY PATHS $ENV{CRYHOME}/lib NO_DEFAULT_PATH )
# genie (copied from nugen)
cet_find_library( LOG4CPP NAMES log4cpp PATHS ENV LOG4CPP_LIB NO_DEFAULT_PATH )
cet_find_library( GFWMSG NAMES GFwMsg PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWREG NAMES GFwReg PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWALG NAMES GFwAlg PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWINT NAMES GFwInt PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWGHEP NAMES GFwGHEP PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWNUM NAMES GFwNum PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWUTL NAMES GFwUtl PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWPARDAT NAMES GFwParDat PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWEG NAMES GFwEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GFWNTP NAMES GFwNtp PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHXSIG NAMES GPhXSIg PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHPDF NAMES GPhPDF PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHNUCLST NAMES GPhNuclSt PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHCMN NAMES GPhCmn PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDCY NAMES GPhDcy PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHHADTRANSP NAMES GPhHadTransp PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHHADNZ NAMES GPhHadnz PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDEEX NAMES GPhDeEx PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHAMNGXS NAMES GPhAMNGXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHAMNGEG NAMES GPhAMNGEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHCHMXS NAMES GPhChmXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHCOHXS NAMES GPhCohXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHCOHEG NAMES GPhCohEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDISXS NAMES GPhDISXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDISEG NAMES GPhDISEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDFRCXS NAMES GPhDfrcXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHDFRCEG NAMES GPhDfrcEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHGLWRESXS NAMES GPhGlwResXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHGLWRESEG NAMES GPhGlwResEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHIBDXS NAMES GPhIBDXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHIBDEG NAMES GPhIBDEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHMNUCXS NAMES GPhMNucXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHMNUCEG NAMES GPhMNucEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHMEL NAMES GPhMEL PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHNUELXS NAMES GPhNuElXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHNUELEG NAMES GPhNuElEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHQELXS NAMES GPhQELXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHQELEG NAMES GPhQELEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHRESXS NAMES GPhResXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHRESEG NAMES GPhResEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHSTRXS NAMES GPhStrXS PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHSTREG NAMES GPhStrEG PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GPHNDCY NAMES GPhNDcy PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GTLGEO NAMES GTlGeo PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GTLFLX NAMES GTlFlx PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GRWFWK NAMES GRwFwk PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GRWIO NAMES GRwIO PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
cet_find_library( GRWCLC NAMES GRwClc PATHS ENV GENIE_LIB NO_DEFAULT_PATH )
# GENIE pre-R-3 used GSL via ROOT's Math libs, now makes direct call not available via that route
cet_find_library( GSL NAMES gsl PATHS ENV GSL_LIB NO_DEFAULT_PATH )
set (GENIE_LIB_LIST ${GFWMSG}
${GFWREG}
${GFWALG}
${GFWINT}
${GFWGHEP}
${GFWNUM}
${GSL} # FWNUM relies on GSL
${GFWUTL}
${GFWPARDAT}
${GFWEG}
${GFWNTP}
${GPHXSIG}
${GPHPDF}
${GPHNUCLST}
${GPHCMN}
${GPHDCY}
${GPHHADTRANSP}
${GPHHADNZ}
${GPHDEEX}
${GPHAMNGXS}
${GPHAMNGEG}
${GPHCHMXS}
${GPHCOHXS}
${GPHCOHEG}
${GPHDISXS}
${GPHDISEG}
${GPHDFRCXS}
${GPHDFRCEG}
${GPHGLWRESXS}
${GPHGLWRESEG}
${GPHIBDXS}
${GPHIBDEG}
${GPHMNUCXS}
${GPHMNUCEG}
${GPHMEL}
${GPHNUELXS}
${GPHNUELEG}
${GPHQELXS}
${GPHQELEG}
${GPHRESXS}
${GPHRESEG}
${GPHSTRXS}
${GPHSTREG}
${GPHNDCY}
${GTLGEO}
${GTLFLX}
${GRWFWK}
${GRWIO}
${GRWCLC}
${LOG4CPP}
)
# marley libraries
cet_find_library( MARLEY NAMES MARLEY PATHS ENV MARLEY_LIB NO_DEFAULT_PATH )
cet_find_library( MARLEY_ROOT NAMES MARLEY_ROOT PATHS ENV MARLEY_LIB NO_DEFAULT_PATH )
# temporarily needed since this is an unexpected header path
include_directories( $ENV{IFDHC_FQ_DIR}/inc )
# macros for dictionary and simple_plugin
include(ArtDictionary)
include(ArtMake)
include(BuildPlugins)
# source
add_subdirectory(larsim)
# tests
add_subdirectory(test)
# ups - table and config files
add_subdirectory(ups)
# packaging utility
include(UseCPack)