-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if the CLHEP target exists before creating it #1169
Conversation
This happens with which version of Geant4? |
This happens with a Geant4 installed with the builtin CLHEP and a separate installation of CLHEP when trying to build several packages that depend on DD4hep at the same time, either the |
Uhh, that looks like a recipe for disaster and potential header / library mismatch. |
But I think it's irrelevant for this PR having two installations, the same error would happen with a single installation having the builtin CLHEP from Geant4 and building several packages at the same time (this doesn't happen with a single package depending on DD4hep but it happens with two) |
If we have a Geant4 builtin CLHEP, we should still be using the Geant4 builtin CLHEP here though, so we shouldn't use the already existing CLHEP::CLHEP target. |
How do we know the |
At least until now, Geant4 didn't create a CLHEP::CLHEP, which is why we are creating it here. So if there is CLHEP::CLHEP, it didn't come from Geant4. Which is why I initially asked which version of Geant4 this happens with. |
Yep it's Gaudi as I said, so you could have a Geant 4 with CLHEP builtin and Gaudi using that CLHEP and creating |
Yes, it is a weird case, which should be avoided, i.e., use external CLHEP for Geant4. At least with the warning we get some indication that this might be causing issues. (Probably only if you run Geant4 inside Gaudi, which I personally don't do much...) |
Could you rebase and squash please? |
Done
I agree. It just happens that my Linux distributions ships geant4 or the geant4 recipes with the builtin CLHEP which is still useful to check that things compile, running there can be a mismatch of CLHEP versions... |
BEGINRELEASENOTES
ENDRELEASENOTES