File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ else()
2424 find_package (Geant4 REQUIRED)
2525endif ()
2626
27+ # In Geant4 > 10.6 the preprocessing macros for excluding UI and VIS
28+ # are not available anymore. Preprocess variable GEANT4_GT_10_6
29+ # is used to exclude checks on UI and VIS in A2.cc file.
30+ if ( Geant4_VERSION GREATER_EQUAL 10.6 )
31+ message (STATUS "Configuring A2Geant4 for Geant4 version >= 10.6" )
32+ add_compile_definitions (GEANT4_GT_10_6=1)
33+ endif ()
34+
2735# define variables
2836set (EXT_LIBRARIES)
2937
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ August 17, 2018
4949## Installation
5050
5151### Dependencies
52- * Geant4 10.2/10.3/10.4/10.5
52+ * Geant4 10.2/10.3/10.4/10.5/10.6/10.7
5353* ROOT 5 or 6
5454* CMake 3.3
5555* Optional: Qt 4 or 5
@@ -69,8 +69,11 @@ tar xvfz geant4.10.04.p02.tar.gz
6969Create a build directory (not inside the source directory) and run cmake. Set
7070CMAKE_INSTALL_PREFIX to the final installation location and GEANT4_USE_QT to ON
7171if you want to use the graphical user interface. Set GEANT4_INSTALL_DATA to ON
72- so the large data packages will be downloaded automatically. Set N to the number
73- of CPU cores to speed up the compilation process:
72+ so the large data packages will be downloaded automatically.
73+ Modern versions of ROOT require at least C++-14. In such cases, you need to
74+ tell the compiler to use C++-14 standards here as well, by adding
75+ -DCMAKE_CXX_STANDARD=14 to the cmake line.
76+ Set N to the number of CPU cores to speed up the compilation process:
7477```
7578cd /tmp
7679mkdir build
Original file line number Diff line number Diff line change 1717#include " G4UIQt.hh"
1818#include " G4Qt.hh"
1919#endif
20+ #ifdef GEANT4_GT_10_6
21+ #include " G4VisExecutive.hh"
22+ #include " G4UIExecutive.hh"
23+ #else
2024#ifdef G4VIS_USE
2125#include " G4VisExecutive.hh"
2226#endif
2327#ifdef G4UI_USE
2428#include " G4UIExecutive.hh"
2529#endif
30+ #endif
2631
2732#include " A2DetectorConstruction.hh"
2833#include " A2PhysicsList.hh"
You can’t perform that action at this time.
0 commit comments