What determines where an application looks for Dataset

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_v4.11.2.2
_Operating System:_Mac OS Sonoma 14.4
_Compiler/Version:_Apple clang version 15.0.0 (clang-1500.3.9.4)
_CMake Version:_cmake version 3.21.4

The application builds okay and if I run with an option like -help all is okay.

But when trying to run a simulation I get the following

<<< Geant4 Physics List simulation engine: FTFP_BERT

G4VModularPhysicsList::ReplacePhysics: G4EmStandard with type : 2 is replaced with G4EmStandard_opt4

-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : had014
issued by : G4GammaNuclearXS::RetrieveVector(…)
Data file </opt/local/share/Geant4/Data/Geant4.10.6/G4PARTICLEXS2.1/gamma/inel93> is not opened!Check G4PARTICLEXSDATA

*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

Now I tried using

cmake -DGEANT4_INSTALL_DATA=ON …

But I did get a warning

CMake Warning:
Manually-specified variables were not used by the project:

GEANT4_INSTALL_DATA

The I know the developer does not use CMake is there some option in CMakeLists.txt
that I need to use?


There’s an layered lookup based on builtin paths, a single environment variable and then env vars per dataset, details here: Postinstall Setup — Geant4 Installation Guide 11.2 documentation

1 Like

Thanks - Now sorted.