From c2cbfbf0366d4099142d926795a7535d026632b5 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 7 Nov 2023 19:10:29 +0100 Subject: [PATCH] Ignore warning for the current version of MSVC Signed-off-by: Jose Luis Rivero --- testing/include/gz/common/testing/CMakeTestPaths.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/include/gz/common/testing/CMakeTestPaths.hh b/testing/include/gz/common/testing/CMakeTestPaths.hh index 0ce2471a..9c8c55c1 100644 --- a/testing/include/gz/common/testing/CMakeTestPaths.hh +++ b/testing/include/gz/common/testing/CMakeTestPaths.hh @@ -28,6 +28,18 @@ namespace gz::common::testing /// /// It is not intended that users will directly construct this, but rather /// utilize the TestPathFactory. + +/// TODO(jrivero) Remove warning disable when bumping MSVC oon CI +/// MSVC v16.11.25 complains about the TestPaths class not having a DLL although +/// relevant members of it have visiblity defined: +/// "non dll-interface class 'gz::common::testing::TestPaths' used as base for +/// dll-interface class 'gz::common::testing::CMakeTestPaths'" +/// +/// Workaround on this problems triggeres new warnings and suffering and +/// more recent versions of MSVC do not trigger that warning anymore. +/// Cnnclusion: disable the warnoing. +# pragma warning( push ) +# pragma warning( disable: 4275 ) class GZ_COMMON_TESTING_VISIBLE CMakeTestPaths: public TestPaths { /// \brief Constructor from TestPaths @@ -43,4 +55,5 @@ class GZ_COMMON_TESTING_VISIBLE CMakeTestPaths: public TestPaths public: bool TestTmpPath(std::string &_tmpDir) override; }; } // namespace gz::common::testing +# pragma warning( popd ) #endif // GZ_COMMON_TESTING_CMAKETESTPATHS_HH_