Skip to content

Commit

Permalink
Fix test_config.h to include real engines found (gz-rendering6) (#1089)
Browse files Browse the repository at this point in the history
* Fix test_config.h to include real engines found

Instead of hardcoding them by architecture, create the right
list of engines from the support found by CMake.

Signed-off-by: Jose Luis Rivero <[email protected]>

* Ogre and Ogre2 are not compatible. Prefer to have Ogre2.

Signed-off-by: Jose Luis Rivero <[email protected]>

* Remove optix from Mac

Signed-off-by: Jose Luis Rivero <[email protected]>

---------

Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Dec 4, 2024
1 parent dd143fb commit 46cde99
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions test/test_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,35 @@
#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"};
static const std::vector<const char *> kRenderEngineTestValues{"ogre"};
#else
static const std::vector<const char *> 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<const char *> kRenderEngineTestValues{"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{"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 46cde99

Please sign in to comment.