| Summary: | Allow local install of data libraries using the GEANT4_INSTALL_DATA option | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Iwan Cornelius <iwancornelius> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | enhancement | CC: | kelsey |
| Priority: | P1 | ||
| Version: | 9.5 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Iwan Cornelius
2012-01-28 04:34:34 CET
In 9.5.p01, cmake/Modules/Geant4InstallData.cmake fills GEANT4_INSTALL_DATADIR to specify the location where the data files should be downloaded. If the user attempts to set this parameter directly, e.g., cmake -DGEANT4_INSTALL_DATADIR=/path/to/G4data ../g4.9.5.p01 it will be ignored, and none of the data-related environment variables will be set. If the user sets _both_ this parameter and the download flag, e.g., cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATADIR=/path/to/G4data ../g4.9.5.p01 the envvars will be set, of course. But that also requires that CMake/Make does the download itself (which it will do even if the user has already unpacked the data files!). It would be nice if the first option (above) worked as the original poster requested, and as a naive user might expect: look in that directory for the expected data directories (as already known to CMake), and if they are found, set the corresponding envvar in geant4make.csh/sh. Selection of a custom install directory for data is complete. The check for pre-installed data is being worked on. This will be in Release 9.6 Marking as high priority for 9.6 release Fixed in tag cmake-V09-05-61 using the following logic (using Mike's example): cmake -DGEANT4_INSTALL_DATADIR=/path/to/G4data ../g4.9.5.p01 Will check for the required datasets under /path/to/G4data. If they exist - defined as the presence of the expected dataset directory - they will be reused. If one or more do not exist, the configuration will set up the environment to assume they will be there at some point in the future - and a warning/advice message will be emitted informing the user which datasets are missing, and how to install them. This will not stop configuration or break a build. If the GEANT4_INSTALL_DATA option is set: cmake -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATADIR=/path/to/G4data ../g4.9.5.p01 then the same logic as above is applied, but CMake will add automatic download and install of any missing datasets to /path/to/G4data. Cheers, Ben. |