Skip to content

Commit

Permalink
Ignore warning for the current version of MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Nov 7, 2023
1 parent 44f77e4 commit c2cbfbf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions testing/include/gz/common/testing/CMakeTestPaths.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_

0 comments on commit c2cbfbf

Please sign in to comment.