Commit
23ee7e05311b6de49a3251040f405d0f19a229fa
by noreplyWorkaround missing G4persistency target bug in Geant4 11.2 (#1122)
* Workaround missing G4persistency target bug in Geant4 11.2
Geant4 11.2 split the G4persistency target into subcomponents:
- G4mctruth
- G4geomtext
- G4gdml (optional, only if Geant4 built with GDML support)
and so projects use the direct CMake targets will fail to link
these versions. A bug fix will be made in Geant4 itself to address
this.
Workaround issue in Celeritas by translating request for "persistency"
target in celeritas_get_g4libs to appropriate underlying targets. Use
translation rather than creation of our own imported target to:
- avoid possible (albeit unlikely) clashes with other projects that
might create the same target.
- Reduce dependence on use of Celeritas' FindGeant4 wrapper by downstream
projects.
* Ignore request for G4tasking if G4 11.2+
* Simplify logic of Geant4 target checking
Check obvious case first, then the special cases for persistency
and tasking. Post-process list to remove duplicates to avoid
ld warnings observed on macOS.