diff --git a/test/test_config.h.in b/test/test_config.h.in index 8297d3206..c24fa7bea 100644 --- a/test/test_config.h.in +++ b/test/test_config.h.in @@ -9,16 +9,35 @@ #define RENDER_ENGINE_VALUES ::testing::ValuesIn(\ gz::rendering::TestValues()) +#include +#include +#include + /// \todo(anyone) re-enable ogre2 test once ogre 2.2 works on macOS #ifdef __APPLE__ -static const std::vector kRenderEngineTestValues{"ogre", "optix"}; +static const std::vector kRenderEngineTestValues{"ogre"}; #else -static const std::vector kRenderEngineTestValues{"ogre2", "optix"}; + /// We can not mix ogre and ogre2 tests in Fortress for a single test file + /// prefer here ogre2 over ogre. + #if defined(HAVE_OGRE) && defined(HAVE_OPTIX) && defined(HAVE_OGRE2) + static const std::vector kRenderEngineTestValues{"ogre2", "optix"}; + #elif defined(HAVE_OGRE) && defined(HAVE_OPTIX) + static const std::vector kRenderEngineTestValues{"ogre", "optix"}; + #elif defined(HAVE_OGRE) && defined(HAVE_OGRE2) + static const std::vector kRenderEngineTestValues{"ogre2"}; + #elif defined(HAVE_OGRE2) && defined(HAVE_OPTIX) + static const std::vector kRenderEngineTestValues{"ogre2", "optix"}; + #elif defined(HAVE_OGRE) + static const std::vector kRenderEngineTestValues{"ogre"}; + #elif defined(HAVE_OGRE2) + static const std::vector kRenderEngineTestValues{"ogre2"}; + #elif defined(HAVE_OPTIX) + static const std::vector kRenderEngineTestValues{"optix"}; + #else + #warning "Can not detect a rendering engine support: ogre | ogre2 | optix" + #endif #endif -#include -#include - namespace ignition { namespace rendering