Skip to content

Instantly share code, notes, and snippets.

@junaire
Created September 6, 2022 06:36
Show Gist options
  • Save junaire/b69279283648f68ddeaf5408c7090b3b to your computer and use it in GitHub Desktop.
Save junaire/b69279283648f68ddeaf5408c7090b3b to your computer and use it in GitHub Desktop.
Simple script to build root in the CMSSW workstation
#!/bin/bash
STORAGE=/tmp
BUILDTYPE=$1
echo "Setting essential dev tools..."
source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc8-opt/setup.sh
echo "Doing a ${BUILDTYPE} build..."
cmake -DCMAKE_BUILD_TYPE=${BUILDTYPE} \
-DLLVM_BUILD_TYPE=${BUILDTYPE} \
../root
LOG=${STORAGE}/$(date '+%m-%d-%H-%M-%S')-build.log
echo "Start building..."
echo "Logs stored in ${LOG}"
make -j$(nproc) > ${LOG} &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment