Skip to content

Commit

Permalink
Suppress dll-interface warnings (C4251) on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Feb 14, 2025
1 parent 3feca61 commit b7a9a47
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2DynamicRenderable.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
#pragma warning(pop)
#endif

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace Ogre
{
class MovableObject;
Expand Down Expand Up @@ -154,4 +161,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2GaussianNoisePass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
#include "gz/rendering/ogre2/Ogre2RenderPass.hh"
#include "gz/rendering/ogre2/Export.hh"

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -57,4 +64,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2GlobalIlluminationCiVct.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@

#include <memory>

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace Ogre
{
class HlmsPbs;
Expand Down Expand Up @@ -230,4 +237,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2GlobalIlluminationVct.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@

#include <memory>

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace Ogre
{
class HlmsPbs;
Expand Down Expand Up @@ -148,4 +155,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2LensFlarePass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
#include "gz/rendering/ogre2/Export.hh"
#include "gz/rendering/ogre2/Ogre2RenderPass.hh"

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -101,4 +108,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
12 changes: 12 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2Object.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
#include "gz/rendering/ogre2/Ogre2RenderTypes.hh"
#include "gz/rendering/ogre2/Export.hh"

#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace gz
{
namespace rendering
Expand Down Expand Up @@ -50,4 +57,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
13 changes: 13 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2RenderPass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
#include "gz/rendering/ogre2/Export.hh"
#include "gz/rendering/ogre2/Ogre2Object.hh"


#ifdef _MSC_VER
#pragma warning(push)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed to hidden by default.
#pragma warning(disable:4251)
#endif

namespace Ogre
{
class CompositorWorkspace;
Expand Down Expand Up @@ -92,4 +100,9 @@ namespace gz
}
}
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

#endif
3 changes: 3 additions & 0 deletions ogre2/include/gz/rendering/ogre2/Ogre2RenderTargetMaterial.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#pragma warning(push)
// Silence deriving from Ogre::RenderTargetListener dll-linkage warnings
#pragma warning(disable:4275)
// Suppress dll-interface warning. This should no longer be needed in
// gz-rendering9 as visibility changed hidden by default.
#pragma warning(disable:4251)
#endif

namespace gz
Expand Down

0 comments on commit b7a9a47

Please sign in to comment.