Skip to content

Commit

Permalink
Workaround on warnings for Ubuntu Noble (#995)
Browse files Browse the repository at this point in the history
* Add pragma ignores for Woverloaded-virtual
* Ignore the warning on FindCUDA removal

---------

Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Apr 26, 2024
1 parent 69f56bd commit 9f397e1
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -171,6 +171,11 @@ set(GZ_RENDERING_ENGINE_INSTALL_DIR
if(NOT MSVC)
#--------------------------------------
# Find CUDA
# Module is being removed in CMake and needs a non trivial
# migration https://cmake.org/cmake/help/latest/policy/CMP0146.html
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
find_package(CUDA)

#--------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions include/gz/rendering/Camera.hh
Expand Up @@ -28,6 +28,13 @@
#include "gz/rendering/Sensor.hh"
#include "gz/rendering/Scene.hh"

// overloaded-virtuals warnings appeared on Ubuntu Noble
// GCC-13. it is not easy to fix them without breaking ABI
// ignore them to preserve current ABI.
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

namespace gz
{
Expand Down Expand Up @@ -369,4 +376,9 @@ namespace gz
}
}
}

#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif

#endif
13 changes: 13 additions & 0 deletions include/gz/rendering/Object.hh
Expand Up @@ -22,6 +22,14 @@
#include "gz/rendering/RenderTypes.hh"
#include "gz/rendering/Export.hh"

// overloaded-virtuals warnings appeared on Ubuntu Noble
// GCC-13. it is not easy to fix them without breaking ABI
// ignore them to preserve current ABI.
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -69,4 +77,9 @@ namespace gz
}
}
}

#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif

#endif
13 changes: 13 additions & 0 deletions include/gz/rendering/Visual.hh
Expand Up @@ -22,6 +22,14 @@
#include "gz/rendering/config.hh"
#include "gz/rendering/Node.hh"

// overloaded-virtuals warnings appeared on Ubuntu Noble
// GCC-13. it is not easy to fix them without breaking ABI
// ignore them to preserve current ABI.
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -206,4 +214,9 @@ namespace gz
}
}
}

#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif

#endif
13 changes: 13 additions & 0 deletions include/gz/rendering/base/BaseRenderTarget.hh
Expand Up @@ -25,6 +25,14 @@
#include "gz/rendering/Scene.hh"
#include "gz/rendering/base/BaseRenderTypes.hh"

// overloaded-virtuals warnings appeared on Ubuntu Noble
// GCC-13. it is not easy to fix them without breaking ABI
// ignore them to preserve current ABI.
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -406,4 +414,9 @@ namespace gz
}
}
}

#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif

#endif

0 comments on commit 9f397e1

Please sign in to comment.