Allow disabling of GDML so there is no dependency on xerces-c
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user