-
Notifications
You must be signed in to change notification settings - Fork 99
/
bootstrap.sh
executable file
·31 lines (26 loc) · 1.16 KB
/
bootstrap.sh
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
#!/bin/bash
########################################################################################################################
#
# Assuming you have CVMFS and run SLC6, CERN Centos7 or macOS Sierra you can bootstrap dd4hep by executing this script
#
########################################################################################################################
source /cvmfs/sft.cern.ch/lcg/views/LCG_101/x86_64-centos7-gcc11-opt/setup.sh
STRING=$(env LC_CTYPE=C tr -dc "a-zA-Z0-9-_\$\?" < /dev/urandom | head -c 4)
mkdir build_${STRING}
cd build_${STRING}
if [ "$(uname)" == "Darwin" ]; then
cmake -GNinja -D DD4HEP_USE_GEANT4=ON -DBoost_NO_BOOST_CMAKE=ON -D DD4HEP_USE_LCIO=ON -D BUILD_TESTING=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DROOT_DIR=$ROOTSYS ..
else
cmake -GNinja -D DD4HEP_USE_GEANT4=ON -DBoost_NO_BOOST_CMAKE=ON -D DD4HEP_USE_LCIO=ON -D BUILD_TESTING=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DROOT_DIR=$ROOTSYS ..
fi
ninja
ninja install
source ../bin/thisdd4hep.sh
ctest --output-on-failure -j4
cd ../examples/
mkdir build_${STRING}
cd build_${STRING}
cmake -GNinja ..
ninja
ninja install
ctest --output-on-failure