You can build a c++14
aware Geant4 using: cmake -DGEANT4_BUILD_CXXSTD=14 ...
If you want to have everything using c++17
, you need to build ROOT using “cmake -DCMAKE_CXX_STANDARD=17
” and Geant4 using “cmake -DGEANT4_BUILD_CXXSTD=17
”
Note that, afterward, in any case, you also need to build Garfield++ with the same C++ standard (I guess @hschindl can tell you how).