| Summary: | Using Geant4 10.4 requires CMake >= 3.8 | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Pere Mato <pere.mato> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 10.4 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Pere Mato
2018-03-15 14:29:20 CET
Saw the ticket... cut&pasting here! Hi Pere, certainly, Ben can better comment.. But isn't the feature itself 'cxx_std_14' directly set by CMake ? It seems to me a limitation of that specific version of CMake. Is it possible ? I think the same 'problem' applies with c++17 which we recently enabled as we were requested for that. We are allowing selection of c++17 but do not force checks on the minimum CMake version to be used (3.3 is the minimum we currently support, but one need at least 3.8 in order for CMake to understand c++17). The alternative would be to throw an error immediately at configuration, by forcing the minimum version of CMake to be 3.8 also for people not requesting c++14 or c++17.. Gabriele Indeed, the "meta features" for the C++ standard are only set in CMake 3.8 and above. They get set for 14/17 because the logic in these cases is to set all known features for the standard. Since the meta features appear in that list, they get added. I'd therefore agree it's a bug - in the immediate GeantV use case, it may be possible to work around it by adding the feature directly to the list of known features (but I have to test this first to give a clear answer). For patches, we can simply filter out "cxx_std_14", but leave "cxx_std_!7". Gabriele is right that we should also look at setting/checking a minimum CMake version with which the Geant4Config files are compatible! As far as I understood, Pere correct me if I'm wrong, Pere was using a pre-built installation of Geant4 from the LCG build, which was installed with a version of CMake >= 3.8 and with c++14 enabled. Then, tried to build GV using CMake 3.7 and getting those errors. This will be fixed with the move to require a minimum version of CMake 3.12 for building Geant4, and as part of that we'll define the minimum CMake version needed to use a build/install. Now fixed in master in MR 608, which enforces the minimum CMake version at both build and use time. |