Repository navigation
Expand file tree
/
Copy pathacts.sh
More file actions
88 lines (77 loc) · 3.49 KB
/
Copy pathacts.sh
File metadata and controls
88 lines (77 loc) · 3.49 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
package: ACTS
version: "%(tag_basename)s"
tag: "v48.5.0-alice"
requires:
- ROOT
- pythia
- GEANT4
- HepMC3
- xercesc
- TBB
license: GPL-3.0
build_requires:
- "GCC-Toolchain:(?!osx)"
- CMake
- boost
- Eigen3
- ninja
- alibuild-recipe-tools
source: https://github.com/AliceO2Group/acts.git
---
#!/bin/bash -ex
cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX=$INSTALLROOT \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DACTS_BUILD_PYTHON_BINDINGS=ON \
-DACTS_BUILD_FATRAS=ON \
-DACTS_BUILD_EXAMPLES=ON \
-DACTS_BUILD_ANALYSIS_APPS=ON \
-DACTS_BUILD_EXAMPLES_PYTHIA8=ON \
-DACTS_BUILD_PLUGIN_ROOT=ON \
-DCMAKE_PREFIX_PATH=${PYTHIA_ROOT} \
-DACTS_BUILD_PLUGIN_GEANT4=ON \
-DACTS_BUILD_FATRAS_GEANT4=ON \
-DACTS_BUILD_EXAMPLES_GEANT4=ON \
-DACTS_BUILD_EXAMPLES_ROOT=ON \
-DACTS_BUILD_ALIGNMENT=ON \
-DGeant4_DIR=${GEANT4_ROOT}/lib \
-G Ninja
cmake --build . -- ${JOBS:+-j$JOBS}
cmake --install .
# Install ACTS example headers required by ACTSO2
cmake -E copy_directory \
"$SOURCEDIR/Examples/Algorithms/Digitization/include/ActsExamples/Digitization" \
"$INSTALLROOT/include/ActsExamples/Digitization"
cmake -E copy_directory \
"$SOURCEDIR/Examples/Detectors/Common/include/ActsExamples/DetectorCommons" \
"$INSTALLROOT/include/ActsExamples/DetectorCommons"
cmake -E copy_directory \
"$SOURCEDIR/Examples/Algorithms/TrackFinding/include/ActsExamples/TrackFinding" \
"$INSTALLROOT/include/ActsExamples/TrackFinding"
case $ARCHITECTURE in
osx*)
find $INSTALLROOT/lib/ -name "*.dylib" -exec install_name_tool -add_rpath ${INSTALLROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${INSTALLROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${INSTALLROOT}/python/acts {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${GEANT4_ROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${XERCESC_ROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${ROOT_DYN_PATH} {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${TBB_ROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${HEPMC3_ROOT}/lib {} \;
find $INSTALLROOT/python/acts -name "*.so" -exec install_name_tool -add_rpath ${PYTHIA_ROOT}/lib {} \;
;;
esac
[[ -d $INSTALLROOT/lib64 ]] && [[ ! -d $INSTALLROOT/lib ]] && ln -sf ${INSTALLROOT}/lib64 $INSTALLROOT/lib
# ModuleFile
MODULEDIR="${INSTALLROOT}/etc/modulefiles"
MODULEFILE="${MODULEDIR}/${PKGNAME}"
mkdir -p ${MODULEDIR}
alibuild-generate-module --bin --lib >"${MODULEFILE}"
# extra environment
cat >>${MODULEFILE} <<EOF
set ACTS_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
setenv ACTS_ROOT \$ACTS_ROOT
prepend-path ROOT_INCLUDE_PATH \$ACTS_ROOT/include
EOF
# Print a message to remind people to source the ACTS python bindings
echo -e "\033[1mTo use the ACTS python bindings, source the following script:\033[0m"
echo ". $ACTS_ROOT/python/setup.sh"