Allow disabling of GDML so there is no dependency on xerces-c

This commit is contained in:
2026-07-01 12:48:54 +02:00
parent 62945c95c4
commit 6a3aabf772
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -93,6 +93,7 @@ After the build, the executables are at `build/run_pbwo4` and `build/run_samplin
| CMake option | Default | Meaning |
|---|---|---|
| `GEANT4_INSTALL_DATA` | `ON` | Download Geant4 physics data tables (~2 GB) |
| `GEANT4_USE_GDML` | `ON` | Build Geant4 with GDML support (requires Xerces-C); set `OFF` to build without Xerces-C |
The superbuild caps parallelism at `min(nproc, 16)` to avoid memory exhaustion.
+2 -1
View File
@@ -18,6 +18,7 @@ set(G4_SRC ${CMAKE_SOURCE_DIR}/../lib/geant4)
set(MINI_SRC ${CMAKE_SOURCE_DIR}/..)
option(GEANT4_INSTALL_DATA "Download Geant4 physics data files (~2 GB)" ON)
option(GEANT4_USE_GDML "Build Geant4 with GDML support (requires Xerces-C)" ON)
# ── Geant4 ────────────────────────────────────────────────────────────────────
ExternalProject_Add(geant4
@@ -28,7 +29,7 @@ ExternalProject_Add(geant4
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=Release
-DGEANT4_INSTALL_DATA=${GEANT4_INSTALL_DATA}
-DGEANT4_USE_GDML=ON
-DGEANT4_USE_GDML=${GEANT4_USE_GDML}
-DGEANT4_BUILD_MULTITHREADED=OFF
-DGEANT4_BUILD_TLS_MODEL=global-dynamic
BUILD_COMMAND cmake --build <BINARY_DIR> --parallel ${NPROC}