CMakeLists.txt 6.56 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
#--- General parameters ----------------------------------------------------------------------------
set(Python_cmd ${Python_home}/bin/${PYTHON})
set(PySetupOptions --root=/ --prefix=<INSTALL_DIR>)

#---Gaudi----------------------------------------------------------------------------
LCGPackage_Add(
  Gaudi
  URL ${GenURL}/Gaudi-<VERSION>.tar.gz
  UPDATE_COMMAND <VOID>
  ENVIRONMENT BINARY_TAG=${LCG_platform}
Pere Mato Vila's avatar
Pere Mato Vila committed
11
              PYTHONPATH=${ROOT_home}/lib  # Needed at runtime for tests
12
  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> 
13
             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Pere Mato Vila's avatar
Pere Mato Vila committed
14
15
16
             IF ${CMAKE_BUILD_TYPE} STREQUAL Debug AND ${LCG_TARGET} MATCHES "clang" THEN 
               -DGAUDI_SLOW_DEBUG=TRUE
             ENDIF
17
18
19
             -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
             -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
             -DCMAKE_FIND_FRAMEWORK=LAST 
Marco Clemencic's avatar
Marco Clemencic committed
20
             -DBoost_NO_BOOST_CMAKE=FALSE
21
             -DHOST_BINARY_TAG=${LCG_platform}
22
23
	     IF ${LCG_OS} MATCHES ubuntu THEN
	        -DGAUDI_USE_GPERFTOOLS=FALSE
Gerardo Ganis's avatar
Gerardo Ganis committed
24
	     ENDIF
25
  INSTALL_COMMAND ${MAKE} install
26
27
28
          IF NOT <VERSION> STREQUAL master AND <VERSION> VERSION_LESS v35r0 THEN
             COMMAND ${EXEC} bash -c "cp -n -r <INSTALL_DIR>/*.cmake <INSTALL_DIR>/cmake"
          ENDIF
haralmha's avatar
haralmha committed
29
  DEPENDS Boost Python GSL ROOT clhep AIDA HepMC XercesC rangev3 cppgsl xenv six fmt pytest PyYAML
30
          IF <VERSION> STREQUAL master OR <VERSION> VERSION_GREATER_EQUAL v35r0 THEN
31
32
             jsonmcpp HepPDT CppUnit libunwind doxygen
             IF NOT ${LCG_OS} MATCHES ubuntu THEN gperftools ENDIF
33
	  ENDIF
34
)
35

Pere Mato Vila's avatar
Pere Mato Vila committed
36
37
#   Add Gaudi tests only of Gaudi is actually build (disable ubuntu for the time being)
if(TARGET Gaudi-${Gaudi_native_version} AND NOT ${LCG_OS} MATCHES ubuntu)
38
39
40
41
  get_property(gaudi-binary-dir TARGET Gaudi-${Gaudi_native_version} PROPERTY _EP_BINARY_DIR)
  if( gaudi-binary-dir )
    LCG_add_test(gaudi-tests
      TEST_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run_gaudi_tests.sh ${CMAKE_INSTALL_PREFIX} ${LCG_platform} ${gaudi-binary-dir}
42
      LABELS Nightly Release Experimental
43
44
45
46
    )
  endif()
endif()

Pere Mato Vila's avatar
Pere Mato Vila committed
47
#---PODIO-------------------------------------------------------------------------------------------
48
49
50
51
52
LCGPackage_add(
    podio
    URL ${GenURL}/podio-${podio_native_version}.tar.gz
    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
               -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
Pere Mato Vila's avatar
Pere Mato Vila committed
53
54
55
               -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
               -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
               -DBUILD_TESTING=OFF
56
57
58
               IF podio_native_version VERSION_GREATER 00.12 AND SIO_native_version THEN
               -DENABLE_SIO=ON
               ENDIF
59
    DEPENDS ROOT Python PyYAML
60
61
62
    IF podio_native_version VERSION_GREATER 00.12 THEN
    DEPENDS_OPT SIO
    ENDIF
63
64
)

65
66
67
68
69
70
71
72
73
74
#---EDM4hep---------------------------------------------------------------------
LCGPackage_add(
    EDM4hep
    URL ${GenURL}/EDM4hep-${EDM4hep_native_version}.tar.gz
    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
               -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
               -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
               -DROOTSYS=${ROOT_home}
               -DBUILD_DDG4EDM4HEP=OFF
               -DBUILD_DELPHESEDM4HEP=ON
75
               -DBUILD_TESTING=OFF 
76
    BUILD_COMMAND ${MAKE} -j4
77
    DEPENDS     ROOT podio HepMC HepPDT tricktrack delphes Jinja2
78
79
80
    IF NOT "$ENV{BUILDMODE}" STREQUAL release THEN  # Cannot create RPMs specfile (externals depending of generators)
      DEPENDS_OPT pythia8
    ENDIF
81
82
    REVISION 1
)
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

#---DD4hep---------------------------------------------------------------------
if(NOT DEFINED DD4hep_${DD4hep_native_version}_geant4)
   set(DD4hep_${DD4hep_native_version}_geant4 "ON")
endif()
LCGPackage_add(
    DD4hep
    URL ${GenURL}/DD4hep-${DD4hep_native_version}.tar.gz
    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
               -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
               -DBOOST_ROOT=${Boost_home}
               -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
               -DDD4HEP_USE_XERCESC=ON
               -DXERCESC_ROOT_DIR=${XercesC_home}
               -DROOTSYS=${ROOT_home}
               IF <DD4hep_<NATIVE_VERSION>_geant4> STREQUAL "ON" THEN
                  -DDD4HEP_USE_GEANT4=ON
               ENDIF
               IF hepmc3_native_version THEN
                  -DDD4HEP_USE_HEPMC3=ON
               ENDIF
               IF EDM4hep_native_version THEN
                  -DDD4HEP_USE_EDM4HEP=ON
               ENDIF
               -DBUILD_DOCS=OFF
               -DDD4HEP_USE_LCIO=ON
	       -DDD4HEP_USE_TBB=ON
               -DDD4HEP_LOAD_ASSIMP=OFF
               ${Boost_extra_configuration}
    BUILD_COMMAND ${MAKE} -j4
    DEPENDS     ROOT XercesC Boost Python LCIO tbb IF <DD4hep_<NATIVE_VERSION>_geant4> STREQUAL "ON" THEN Geant4 ENDIF
    DEPENDS_OPT assimp
115
116
      IF DD4hep_native_version STREQUAL master OR DD4hep_native_version VERSION_GREATER_EQUAL 1.13 THEN hepmc3 ENDIF
      IF DD4hep_native_version STREQUAL master OR DD4hep_native_version VERSION_GREATER_EQUAL 1.15 THEN EDM4hep ENDIF
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
    REVISION 2
)

#--- Acts_core --------------------------------------------------------------------------------------
# Kept for legacy
LCGPackage_add(
    acts_core
    URL ${GenURL}/acts-core-${acts_core_native_version}.tar.gz
    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
               -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
               -DACTS_BUILD_IDENTIFICATION_PLUGIN=ON
               -DACTS_BUILD_DIGITIZATION_PLUGIN=ON
               -DACTS_BUILD_DD4HEP_PLUGIN=ON
               -DACTS_BUILD_TGEO_PLUGIN=ON
               -DACTS_BUILD_LEGACY=ON
               -DACTS_BUILD_TESTS=OFF
               -DEIGEN_INCLUDE_DIR=${eigen_home}/include/eigen3
               "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -I${XercesC_home}/include"
               ${Boost_extra_configuration}
    DEPENDS Boost eigen ROOT DD4hep
)

#--- Acts -------------------------------------------------------------------------------------------
LCGPackage_add(
    acts
    URL ${GenURL}/acts-${acts_native_version}.tar.gz
    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
               -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
145
               -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
146
147
148
149
150
151
152
153
154
               -DACTS_BUILD_PLUGIN_IDENTIFICATION=ON
               -DACTS_BUILD_PLUGIN_DIGITIZATION=ON
               -DACTS_BUILD_PLUGIN_DD4HEP=ON
               -DACTS_BUILD_PLUGIN_TGEO=ON
               -DACTS_BUILD_UNITTESTS=OFF
               "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -I${XercesC_home}/include -I${eigen_home}/include/eigen3"
               ${Boost_extra_configuration}
    DEPENDS Boost eigen ROOT DD4hep
)