Example B4: issues in compiling

Dear exports,
I’m trying to execute examples at cern lxplus machine
following https://ep-dep-sft.web.cern.ch/node/303871
setup:
source /cvmfs/sft.cern.ch/lcg/contrib/gcc/8.3.0/x86_64-centos7/setup.sh
source /cvmfs/geant4.cern.ch/geant4/10.7/x86_64-centos7-gcc8-optdeb-MT/CMake-setup.sh
cp -r /cvmfs/geant4.cern.ch/geant4/10.7/x86_64-centos7-gcc8-optdeb/share/Geant4-10.7.0/examples/basic/B4/

I get error in compilation:
cmake -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/10.7/x86_64-centos7-gcc8-optdeb-MT/lib64/Geant4-10.7.0/ $HOME/B4
CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
CMake 3.8…3.18 or higher is required. You are running version 2.8.12.2

Should I use another setup?
Best, Marianna.

Hello,
you should use a more recent version of cmake, you can find several recent versions in /cvmfs/sft.cern.ch/lcg/contrib/CMake/

You could update your PATH like:
export PATH=/cvmfs/sft.cern.ch/lcg/contrib/CMake/3.18.3/Linux-x86_64/bin/:${PATH}

Hope this helps, Gunter