Skip to content

Commit

Permalink
Clean up a few Windows warnings (#308)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Oct 31, 2022
1 parent e59ff4e commit bae3afe
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(fuel-tools-examples)

# Find the Gazebo Fuel Tools library
find_package(gz-fuel_tools9 QUIET REQUIRED)
set(GZ_FUEL_TOOLS_VER ${gz-fuel_tools9_VERSION_MAJOR})
find_package(gz-fuel_tools8 QUIET REQUIRED)
set(GZ_FUEL_TOOLS_VER ${gz-fuel_tools8_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-FUEL-TOOLS_CXX_FLAGS}")

Expand Down
9 changes: 5 additions & 4 deletions src/FuelClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*
*/

#ifdef _MSC_VER
#pragma warning(push, 0)
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4251) // foo needs to have dll-interface
#endif
#include <google/protobuf/text_format.h>
#include <gz/msgs/fuel_metadata.pb.h>
#ifdef _MSC_VER
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

Expand All @@ -36,6 +36,7 @@
#include <gz/common/Filesystem.hh>
#include <gz/common/Util.hh>

#include <gz/msgs/fuel_metadata.pb.h>
#include <gz/msgs/Utility.hh>

#include "gz/fuel_tools/ClientConfig.hh"
Expand Down
10 changes: 6 additions & 4 deletions src/Interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
*
*/

#ifdef _MSC_VER
#pragma warning(push, 0)
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4251) // foo needs to have dll-interface
#endif
#include <google/protobuf/text_format.h>
#include <gz/msgs/fuel_metadata.pb.h>
#ifdef _MSC_VER
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

#include <gz/msgs/fuel_metadata.pb.h>

#include <gz/msgs/Utility.hh>
#include "gz/common/Console.hh"
#include "gz/fuel_tools/Interface.hh"
Expand Down
15 changes: 5 additions & 10 deletions src/gz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,20 @@
#include <string.h>
#include <tinyxml2.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable: 4251) // foo needs to have dll-interface
#endif
#include <google/protobuf/text_format.h>
#include <gz/msgs/fuel_metadata.pb.h>
#ifdef _MSC_VER
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

#include <csignal>
#include <exception>

#ifdef _MSC_VER
#pragma warning(push, 0)
#endif
#include <gz/msgs/fuel_metadata.pb.h>
#include <gz/msgs/Utility.hh>
#ifdef _MSC_VER
#pragma warning(pop)
#endif

#ifdef _WIN32
// DELETE is defined in winnt.h and causes a problem with REST::DELETE
Expand Down

0 comments on commit bae3afe

Please sign in to comment.