Commit 0aee7c12 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

WRG: silence warning C4251 cause by gdal includes on windows

parent 1ecb0c81
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define otbSpatialReference_h #define otbSpatialReference_h
#include "OTBGdalAdaptersExport.h" #include "OTBGdalAdaptersExport.h"
#include "ogr_spatialref.h"
#include <memory> #include <memory>
#include <string> #include <string>
...@@ -34,6 +33,10 @@ ...@@ -34,6 +33,10 @@
// to have dll-interface to be used by clients of class 'otb::SpatialReference' // to have dll-interface to be used by clients of class 'otb::SpatialReference'
// As long as otb::SpatialReference::m_SR is private no need to export this type. // As long as otb::SpatialReference::m_SR is private no need to export this type.
#endif #endif
// causes warning C4251 on Windows
#include "ogr_spatialref.h"
class OGRSpatialReference; class OGRSpatialReference;
namespace otb namespace otb
......
...@@ -20,7 +20,14 @@ ...@@ -20,7 +20,14 @@
#include "otbCoordinateTransformation.h" #include "otbCoordinateTransformation.h"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4251)
#include "ogr_spatialref.h" #include "ogr_spatialref.h"
#pragma warning(pop)
#else
#include "ogr_spatialref.h"
#endif
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
......
...@@ -23,7 +23,16 @@ ...@@ -23,7 +23,16 @@
/*===============================[ Includes ]================================*/ /*===============================[ Includes ]================================*/
/*===========================================================================*/ /*===========================================================================*/
#include "otbOGRGeometryWrapper.h" #include "otbOGRGeometryWrapper.h"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4251)
#include "ogr_geometry.h" #include "ogr_geometry.h"
#pragma warning(pop)
#else
#include "ogr_geometry.h"
#endif
#ifdef _MSC_VER #ifdef _MSC_VER
// warning conversion int -> bool // warning conversion int -> bool
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "otbSpatialReference.h" #include "otbSpatialReference.h"
#include "ogr_spatialref.h"
#include "cpl_conv.h" #include "cpl_conv.h"
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic ignored "-Wunused-local-typedefs" #pragma clang diagnostic ignored "-Wunused-local-typedefs"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment