From 6cc2d5b6577b054e5cf7d03708190fb236cd36e4 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 1 Nov 2023 12:12:56 -0500 Subject: [PATCH] Fix macOS test failures by registering components in the core library Signed-off-by: Addisu Z. Taddese --- src/SdfEntityCreator.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SdfEntityCreator.cc b/src/SdfEntityCreator.cc index 8b5f9698f3..e564cfa64b 100644 --- a/src/SdfEntityCreator.cc +++ b/src/SdfEntityCreator.cc @@ -21,6 +21,14 @@ #include "gz/sim/Events.hh" #include "gz/sim/SdfEntityCreator.hh" +#ifdef __APPLE__ +// Include all known components to ensure that they are registered by the core +// library instead of a plugin to fix +// https://github.com/gazebosim/gz-sim/issues/2204. +// +// NOTE(azeey): This should not be forward ported to ign-gazebo6. +#include "gz/sim/components/components.hh" +#endif #include "gz/sim/components/Actor.hh" #include "gz/sim/components/AirPressureSensor.hh" #include "gz/sim/components/Altimeter.hh"