Commit affa8a51 authored by Simon Braß's avatar Simon Braß
Browse files

Remodel help output

parent b7084cac
Pipeline #9737 failed with stage
in 6 minutes and 4 seconds
......@@ -18,27 +18,37 @@
## We try our best to veto those cases, but beware of the unconventional user.
##
## External tools:
## - Autotools
## - m4
## - Make
## - Autoconf
## - Automake
## - Libtool
## - OCaml
## - Root (as mandatory dependency of Delphes)
## - HepMC2
## - HepMC3
## - LHAPDF6
## - FastJet
## - Pythia8
## - Delphes
## - Rivet (convenience for the author of this script)
## - Autotools
## - m4
## - Make
## - Autoconf
## - Automake
## - Libtool
## - OCaml
## - Root (as mandatory dependency of Delphes)
## - HepMC2
## - HepMC3
## - LHAPDF6
## - FastJet
## - Pythia8
## - Delphes
## - Rivet (convenience for the author of this script)
##
## We configure the external tools for *our* toolchain.
##
## TODO:
## - CMake
## - Compiler FLAGS (FC, CC, CXX) and CFLAGS, CXXFLAGS, FCFLAGS (at least)
##
## Environment variables:
## - FORCE [False|True] Force build of autotools, although the underlying system provides them.
## - BUILD [Path] Path to build directory, defaults to the current working directory.
## - PREFIX [Path] Path to installation directory, defaults to $HOME/local.
## - NPROC [N] Number of parallel processes, defaults to (cores - 1).
## - CMAKE_GENERATOR [Ninja|Unix Makefiles] Use Ninja per default, fallback to Unix Makefiles.
## - DEBUG [False|True] Developer option.
##
test -z "${FORCE}" && FORCE=False
test -z "${BUILD}" && BUILD="$(pwd)"
......@@ -63,9 +73,9 @@ test -z "${ROOT_DIR}" && ROOT_DIR="${PREFIX}"
export PATH="${PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/OpenLoops/lib:${LD_LIBRARY_PATH}"
########################################################################
# #######################################################################
# The locations of the sofware packages
########################################################################
# #######################################################################
# 1. Verify packages (checksum, GPG signature,...)
# 2. Switch to secure HTTP
......@@ -102,7 +112,7 @@ url_whizard="http://whizard.hepforge.org/whizard-2.8.2.tar.gz"
# Analysis Tools
url_rivet="https://gitlab.com/hepcedar/rivetbootstrap/raw/3.1.1/rivet-bootstrap"
########################################################################
# #######################################################################
function fetch_pkg_filename () {
local url="${1}"
......@@ -382,6 +392,7 @@ EOF
# #######################################################################
function help() {
# sed -n 's/^##[[:space:]]//p' "${BASH_SOURCE[0]}" >&2
sed -n 's/^##//p' "${BASH_SOURCE[0]}" >&2
exit 1
}
......@@ -420,7 +431,10 @@ PYTHIA8_CONFIG=(
# PYTHIA8_LIBRARY:FILEPATH=PYTHIA8_LIBRARY-NOTFOUND
# PYTHIA8_hepmcinterface_LIBRARY:FILEPATH=PYTHIA8_hepmcinterface_LIBRARY-NOTFOUND
# PYTHIA8_lhapdfdummy_LIBRARY:FILEPATH=PYTHIA8_lhapdfdummy_LIBRARY-NOTFOUND
## Build chain: FastJet, HepMC and LHAPDF6 → Pythia8 → ROOT → Delphes, HepMC3
##
# CMAKE_INSTALL_PREFIX PATH Path where ROOT will be installed if make install is invoked or the “INSTALL” target is built.
# CMAKE_C_FLAGS STRING Extra flags to use when compiling C source files.
# CMAKE_CXX_FLAGS STRING Extra flags to use when compiling C++ source files.
......@@ -431,11 +445,12 @@ PYTHIA8_CONFIG=(
# Use: FC, CC, CXX for Fortran, C and C++ Compiler
## We handle ROOT "just" a dependency of Delphes and HepMC3.
## We handle ROOT /just/ as a dependency of Delphes and HepMC3.
## Therefore, we do not configure ROOT with any additional external tool, i.e. Pythia8.
## We will only include mandatory dependencies, when needed.
## Note: Per default, we do not include the ROOT build.
## However, the user must set an exisiting ROOT_DIR, where test only the existence of =thisroot.sh= (we are really lazy).
## However, the user *must* set an exisiting =ROOT_DIR=, which we test only on the existence of =thisroot.sh= (we are really lazy) in it.
##
ROOT_CONFIG=(
-DCMAKE_INSTALL_PREFIX="${PREFIX}"
)
......@@ -452,7 +467,6 @@ DELPHES_CONFIG=(
HEPMC3_CONFIG=(
-DCMAKE_INSTALL_PREFIX="${PREFIX}"
-DHEPMC3_ENABLE_PYTHON="OFF"
-DROOT_DIR="${ROOT_DIR}/cmake"
)
WHIZARD_CONFIG=(
......@@ -478,7 +492,7 @@ function main() {
mkdir -p "${BUILD}"
cd "${BUILD}" || (echo "cd: failed to go to ${BUILD}" && exit 2)
if test $# -eq 0 || test "$@" == ""; then
local modes=(autotools hepmc3 lhapdf fastjet pythia8 openloops whizard bin)
local modes=(autotools hepmc2 hepmc3 lhapdf fastjet pythia8 openloops whizard bin)
else
local modes=("${@}")
fi
......@@ -519,6 +533,15 @@ function main() {
if ! test -d "${ROOT_DIR}/cmake" || ! test -f "${ROOT_DIR}/cmake/ROOTConfig.cmake"; then
cmake_and_log "ROOT" "${url_root}" "${ROOT_CONFIG[*]}"
fi
# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:path_to_ROOT6_libraries
HEPMC3_CONFIG+=(
-DHEPMC3_ENABLE_ROOTIO="ON"
-DROOT_DIR="${ROOT_DIR}"
)
else
HEPMC3_CONFIG+=(
-DHEPMC3_ENABLE_ROOTIO="OFF"
)
fi
cmake_and_log "HepMC3" "${url_hepmc3}" "${HEPMC3_CONFIG[*]}"
;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment