mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031582: Configuration, CMake - OCCT fails to build with VTK 9.0
Handle "VTK::" prefix instead of "vtk" used by previous VTK versions for targets. Corrected unexpected location of endif() and broken indentation. Obsolete $VTK_USE_FILE is no more included (basing on VTK version check). Standard_WarningsDisable.hxx/Standard_WarningsRestore.hxx pair is now used to suppress VTK warnings instead of partial disabling.
This commit is contained in:
@@ -51,10 +51,7 @@
|
||||
#include <IVtkDraw_Interactor.hxx>
|
||||
|
||||
// prevent disabling some MSVC warning messages by VTK headers
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4244)
|
||||
#endif
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <vtkAlgorithmOutput.h>
|
||||
#include <vtkAppendPolyData.h>
|
||||
#include <vtkBMPWriter.h>
|
||||
@@ -88,9 +85,7 @@
|
||||
#include <vtkXOpenGLRenderWindow.h>
|
||||
#include <tk.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#if (VTK_MAJOR_VERSION > 8) || (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1)
|
||||
#define HAVE_VTK_SRGB
|
||||
|
@@ -16,9 +16,7 @@
|
||||
#include <IVtkDraw_HighlightAndSelectionPipeline.hxx>
|
||||
|
||||
// prevent disabling some MSVC warning messages by VTK headers
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <vtkRenderer.h>
|
||||
#include <vtkActor.h>
|
||||
#include <vtkPolyDataMapper.h>
|
||||
@@ -26,16 +24,13 @@
|
||||
#include <vtkAppendPolyData.h>
|
||||
#include <vtkProperty.h>
|
||||
#include <vtkRenderWindow.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <IVtkOCC_Shape.hxx>
|
||||
#include <IVtkTools_DisplayModeFilter.hxx>
|
||||
#include <IVtkTools_ShapeDataSource.hxx>
|
||||
#include <IVtkTools_ShapeObject.hxx>
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(IVtkDraw_HighlightAndSelectionPipeline,Standard_Transient)
|
||||
|
||||
//===========================================================
|
||||
|
@@ -22,17 +22,13 @@
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
// prevent disabling some MSVC warning messages by VTK headers
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <vtkActor.h>
|
||||
#include <vtkPolyData.h>
|
||||
#include <vtkPolyDataMapper.h>
|
||||
#include <vtkRenderer.h>
|
||||
#include <vtkSmartPointer.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <IVtk_Types.hxx>
|
||||
#include <IVtkTools_DisplayModeFilter.hxx>
|
||||
|
@@ -14,9 +14,7 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
// prevent disabling some MSVC warning messages by VTK headers
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#ifdef _WIN32
|
||||
#include <vtkWin32RenderWindowInteractor.h>
|
||||
#include <vtkWin32OpenGLRenderWindow.h>
|
||||
@@ -30,13 +28,10 @@
|
||||
#include <vtkCommand.h>
|
||||
#include <vtkObjectFactory.h>
|
||||
#include <vtkSmartPointer.h>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <IVtkDraw_Interactor.hxx>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <IVtkTools_ShapePicker.hxx>
|
||||
#include <IVtkTools_SubPolyDataFilter.hxx>
|
||||
#include <IVtkTools_DisplayModeFilter.hxx>
|
||||
|
@@ -31,14 +31,10 @@
|
||||
#endif
|
||||
|
||||
// prevent disabling some MSVC warning messages by VTK headers
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#endif
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <vtkRenderWindowInteractor.h>
|
||||
#include <vtkSmartPointer.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
#include <IVtkTools_ShapePicker.hxx>
|
||||
#include <IVtkDraw_HighlightAndSelectionPipeline.hxx>
|
||||
|
Reference in New Issue
Block a user