fix Geant4 cmake git-dirty check when building from submodule ADD

The submodule leaves a .git *file* (not directory) pointing to
../../.git/modules/lib/geant4, which passes G4GitUtilities' guard
but causes a FATAL_ERROR when git status fails in the bare /tmp dir.
Remove .git before cmake so the guard fires and the check is skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 16:09:55 +02:00
parent 4ffb2f78b8
commit f5c832fd44
3 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -53,7 +53,8 @@ RUN mkdir dawn-source \
## main package — build Geant4 from submodule source
ADD minicalosim/lib/geant4 /tmp/geant4-src
RUN cmake \
RUN rm -f /tmp/geant4-src/.git && \
cmake \
-S /tmp/geant4-src \
-B /tmp/geant4-build \
-DCMAKE_INSTALL_PREFIX=/opt/geant4-v11.1.2 \