One Definition Rule violations in GeoModel
In testing use/benefit of LTO for FullSimLight/Athena, a small ODR warning arises in GeoModelKernel
, which can be reproduced by building GeoModel with -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
:
[100%] Linking CXX shared library libGeoModelKernel.so
.../GeoModel.git/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoFacet.h:24:7: warning: type 'struct GeoFacet' violates the C++ One Definition Rule [-Wodr]
24 | class GeoFacet : public RCBase
| ^
.../GeoModel.git/GeoModelCore/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h:168:7: note: a type with different bases is defined in another translation unit
168 | class GeoFacet
| ^
[100%] Built target GeoModelKernel
pretty obvious the fix is to rename one of these classes or namespace it, but I'm not sure which would be preferred or what names should be used. Happy to provide a MR if that can be decided!