diff --git a/README.md b/README.md index 0634da7..dfdafa0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/superbuild/CMakeLists.txt b/superbuild/CMakeLists.txt index 4d58e14..5454a5d 100644 --- a/superbuild/CMakeLists.txt +++ b/superbuild/CMakeLists.txt @@ -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= -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 --parallel ${NPROC}