From 7497397b954cf1984e73a520fb0773e3812f00b3 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 3 Dec 2024 17:17:27 +0100 Subject: [PATCH 1/3] 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 --- test/test_config.h.in | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/test/test_config.h.in b/test/test_config.h.in index 8297d3206..64a1bbb63 100644 --- a/test/test_config.h.in +++ b/test/test_config.h.in @@ -9,16 +9,33 @@ #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"}; #else -static const std::vector kRenderEngineTestValues{"ogre2", "optix"}; + #if defined(HAVE_OGRE) && defined(HAVE_OPTIX) && defined(HAVE_OGRE2) + static const std::vector kRenderEngineTestValues{"ogre", "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{"ogre", "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 From a712899aa114ac32d351ad1a51afe6a9e1327bff Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 3 Dec 2024 19:37:45 +0100 Subject: [PATCH 2/3] Ogre and Ogre2 are not compatible. Prefer to have Ogre2. Signed-off-by: Jose Luis Rivero --- test/test_config.h.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_config.h.in b/test/test_config.h.in index 64a1bbb63..45f15ae5c 100644 --- a/test/test_config.h.in +++ b/test/test_config.h.in @@ -17,12 +17,14 @@ #ifdef __APPLE__ static const std::vector kRenderEngineTestValues{"ogre", "optix"}; #else + /// 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{"ogre", "ogre2", "optix"}; + 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{"ogre", "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) From c861a4420f38bf48e8775b705aaa933a73952169 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 4 Dec 2024 17:53:45 +0100 Subject: [PATCH 3/3] Remove optix from Mac Signed-off-by: Jose Luis Rivero --- test/test_config.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_config.h.in b/test/test_config.h.in index 45f15ae5c..c24fa7bea 100644 --- a/test/test_config.h.in +++ b/test/test_config.h.in @@ -15,7 +15,7 @@ /// \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 /// We can not mix ogre and ogre2 tests in Fortress for a single test file /// prefer here ogre2 over ogre.