Skip to content

Commit

Permalink
Fix test_config.h to include real engines found
Browse files Browse the repository at this point in the history
Instead of hardcoding them by architecture, create the right
list of engines from the support found by CMake.

Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
  • Loading branch information
j-rivero committed Dec 3, 2024
1 parent dd143fb commit 7497397
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions test/test_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,33 @@
#define RENDER_ENGINE_VALUES ::testing::ValuesIn(\
gz::rendering::TestValues())

#include <vector>
#include <gz/common/Util.hh>
#include <gz/rendering/config.hh>

/// \todo(anyone) re-enable ogre2 test once ogre 2.2 works on macOS
#ifdef __APPLE__
static const std::vector<const char *> kRenderEngineTestValues{"ogre", "optix"};
#else
static const std::vector<const char *> kRenderEngineTestValues{"ogre2", "optix"};
#if defined(HAVE_OGRE) && defined(HAVE_OPTIX) && defined(HAVE_OGRE2)
static const std::vector<const char *> kRenderEngineTestValues{"ogre", "ogre2", "optix"};
#elif defined(HAVE_OGRE) && defined(HAVE_OPTIX)
static const std::vector<const char *> kRenderEngineTestValues{"ogre", "optix"};
#elif defined(HAVE_OGRE) && defined(HAVE_OGRE2)
static const std::vector<const char *> kRenderEngineTestValues{"ogre", "ogre2"};
#elif defined(HAVE_OGRE2) && defined(HAVE_OPTIX)
static const std::vector<const char *> kRenderEngineTestValues{"ogre2", "optix"};
#elif defined(HAVE_OGRE)
static const std::vector<const char *> kRenderEngineTestValues{"ogre"};
#elif defined(HAVE_OGRE2)
static const std::vector<const char *> kRenderEngineTestValues{"ogre2"};
#elif defined(HAVE_OPTIX)
static const std::vector<const char *> kRenderEngineTestValues{"optix"};
#else
#warning "Can not detect a rendering engine support: ogre | ogre2 | optix"
#endif
#endif

#include <vector>
#include <gz/common/Util.hh>

namespace ignition
{
namespace rendering
Expand Down

0 comments on commit 7497397

Please sign in to comment.