[vtkusers] Building VTK 5.10 with VS 2015

Bill Hoffman bill.hoffman at kitware.com
Mon Mar 7 18:27:44 EST 2016


The attached patch works for me in case someone really needs VTK 5.10.

-Bill


-------------- next part --------------
Only in vtk: .ExternalData
Only in vtk: .git
Only in vtk: .gitattributes
Only in vtk: .hooks-config.bash
diff -aur vtk/Charts/vtkControlPointsItem.cxx VTK5.10.1/Charts/vtkControlPointsItem.cxx
--- vtk/Charts/vtkControlPointsItem.cxx	2016-03-07 17:38:13.321549400 -0500
+++ VTK5.10.1/Charts/vtkControlPointsItem.cxx	2016-03-07 17:56:40.283648300 -0500
@@ -29,7 +29,7 @@
 #include "vtkSmartPointer.h"
 #include "vtkTransform2D.h"
 #include "vtkVectorOperators.h"
-
+#include <vtksys/stl/algorithm>
 #include <cassert>
 #include <limits>
 
diff -aur vtk/Charts/vtkPiecewisePointHandleItem.cxx VTK5.10.1/Charts/vtkPiecewisePointHandleItem.cxx
--- vtk/Charts/vtkPiecewisePointHandleItem.cxx	2016-03-07 17:38:13.382549400 -0500
+++ VTK5.10.1/Charts/vtkPiecewisePointHandleItem.cxx	2016-03-07 17:56:23.513412900 -0500
@@ -28,6 +28,7 @@
 #include "vtkControlPointsItem.h"
 #include "vtkTransform2D.h"
 #include "vtkNew.h"
+#include <vtksys/stl/algorithm>
 
 enum enumPointHandleType
   {
diff -aur vtk/Common/vtkOStreamWrapper.cxx VTK5.10.1/Common/vtkOStreamWrapper.cxx
--- vtk/Common/vtkOStreamWrapper.cxx	2016-03-07 17:38:14.768110200 -0500
+++ VTK5.10.1/Common/vtkOStreamWrapper.cxx	2016-03-07 17:35:46.955614900 -0500
@@ -57,7 +57,6 @@
 VTKOSTREAM_OPERATOR(const vtkLargeInteger&);
 VTKOSTREAM_OPERATOR(const vtkSmartPointerBase&);
 VTKOSTREAM_OPERATOR(const vtkStdString&);
-VTKOSTREAM_OPERATOR(ostream&);
 VTKOSTREAM_OPERATOR(const char*);
 VTKOSTREAM_OPERATOR(void*);
 VTKOSTREAM_OPERATOR(char);
diff -aur vtk/Infovis/vtkAdjacencyMatrixToEdgeTable.cxx VTK5.10.1/Infovis/vtkAdjacencyMatrixToEdgeTable.cxx
--- vtk/Infovis/vtkAdjacencyMatrixToEdgeTable.cxx	2016-03-07 17:38:25.545107400 -0500
+++ VTK5.10.1/Infovis/vtkAdjacencyMatrixToEdgeTable.cxx	2016-03-07 17:49:09.778254300 -0500
@@ -33,6 +33,7 @@
 
 #include <vtksys/stl/map>
 #include <vtksys/stl/functional>
+#include <vtksys/stl/algorithm>
 
 // ----------------------------------------------------------------------
 
diff -aur vtk/Infovis/vtkConvexHull2D.cxx VTK5.10.1/Infovis/vtkConvexHull2D.cxx
--- vtk/Infovis/vtkConvexHull2D.cxx	2016-03-07 17:38:25.685501100 -0500
+++ VTK5.10.1/Infovis/vtkConvexHull2D.cxx	2016-03-07 17:49:52.592471400 -0500
@@ -28,6 +28,7 @@
 #include "vtkSmartPointer.h"
 #include "vtkTransform.h"
 #include "vtkTransformPolyDataFilter.h"
+#include <vtksys/stl/algorithm>
 
 vtkStandardNewMacro(vtkConvexHull2D);
 
diff -aur vtk/Infovis/vtkNormalizeMatrixVectors.cxx VTK5.10.1/Infovis/vtkNormalizeMatrixVectors.cxx
--- vtk/Infovis/vtkNormalizeMatrixVectors.cxx	2016-03-07 17:38:25.825894800 -0500
+++ VTK5.10.1/Infovis/vtkNormalizeMatrixVectors.cxx	2016-03-07 17:49:59.105122600 -0500
@@ -27,7 +27,7 @@
 #include "vtkObjectFactory.h"
 #include "vtkSmartPointer.h"
 #include "vtkTypedArray.h"
-
+#include <vtksys/stl/algorithm>
 ///////////////////////////////////////////////////////////////////////////////
 // vtkNormalizeMatrixVectors
 
diff -aur vtk/Infovis/vtkPairwiseExtractHistogram2D.cxx VTK5.10.1/Infovis/vtkPairwiseExtractHistogram2D.cxx
--- vtk/Infovis/vtkPairwiseExtractHistogram2D.cxx	2016-03-07 17:38:25.872692700 -0500
+++ VTK5.10.1/Infovis/vtkPairwiseExtractHistogram2D.cxx	2016-03-07 17:50:11.938639400 -0500
@@ -36,6 +36,7 @@
 #include "vtkTable.h"
 #include "vtkTimerLog.h"
 #include "vtkUnsignedIntArray.h"
+#include <vtksys/stl/algorithm>
 
 #define VTK_CREATE(type, name) \
   vtkSmartPointer<type> name = vtkSmartPointer<type>::New()
diff -aur vtk/IO/vtkEnSightGoldBinaryReader.cxx VTK5.10.1/IO/vtkEnSightGoldBinaryReader.cxx
--- vtk/IO/vtkEnSightGoldBinaryReader.cxx	2016-03-07 17:38:23.950975300 -0500
+++ VTK5.10.1/IO/vtkEnSightGoldBinaryReader.cxx	2016-03-07 17:42:32.215079100 -0500
@@ -3922,7 +3922,7 @@
 // Returns zero if there was an error.
 int vtkEnSightGoldBinaryReader::ReadLine(char result[80])
 {
-  if ( this->IFile->read(result, 80) == 0)
+  if ( !this->IFile->read(result, 80))
     {
     // The read fails when reading the last part/array when there are no points.
     // I took out the error macro as a tempory fix.
@@ -3941,7 +3941,7 @@
     result[76] = 0;
     // better read an extra 8 bytes to prevent error next time
     char dummy[8];
-    if (this->IFile->read(dummy, 8) == 0)
+    if (!this->IFile->read(dummy, 8))
       {
       vtkDebugMacro("Read (fortran) failed");
       return 0;
@@ -3998,14 +3998,14 @@
   char dummy[4];
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
       }
     }
 
-  if ( this->IFile->read((char*)result, sizeof(int)) == 0)
+  if ( !this->IFile->read((char*)result, sizeof(int)))
     {
     vtkErrorMacro("Read failed");
     return 0;
@@ -4022,7 +4022,7 @@
 
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
@@ -4045,14 +4045,14 @@
   char dummy[4];
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
       }
     }
 
-  if (this->IFile->read((char*)result, sizeof(int)*numInts) == 0)
+  if (!this->IFile->read((char*)result, sizeof(int)*numInts))
     {
     vtkErrorMacro("Read failed.");
     return 0;
@@ -4069,7 +4069,7 @@
 
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
@@ -4092,14 +4092,14 @@
   char dummy[4];
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
       }
     }
 
-  if (this->IFile->read((char*)result, sizeof(float)*numFloats) == 0)
+  if (!this->IFile->read((char*)result, sizeof(float)*numFloats))
     {
     vtkErrorMacro("Read failed");
     return 0;
@@ -4116,7 +4116,7 @@
 
   if (this->Fortran)
     {
-    if (this->IFile->read(dummy, 4) == 0)
+    if (!this->IFile->read(dummy, 4))
       {
       vtkErrorMacro("Read (fortran) failed.");
       return 0;
Only in vtk/Utilities: .gitattributes
diff -aur vtk/Utilities/vtkhdf5/ConfigureChecks.cmake VTK5.10.1/Utilities/vtkhdf5/ConfigureChecks.cmake
--- vtk/Utilities/vtkhdf5/ConfigureChecks.cmake	2016-03-07 17:38:31.095064500 -0500
+++ VTK5.10.1/Utilities/vtkhdf5/ConfigureChecks.cmake	2016-03-07 16:24:59.793320300 -0500
@@ -484,7 +484,7 @@
 # Check a bunch of other functions
 #-----------------------------------------------------------------------------
 IF (WINDOWS)
-  SET (H5_HAVE_TIMEZONE 1)
+  SET (H5_HAVE_TIMEZONE 0)
   SET (H5_HAVE_FUNCTION 1)
 ELSE (WINDOWS)
   FOREACH (test
diff -aur vtk/Utilities/vtklibxml2/config_cmake.h.in VTK5.10.1/Utilities/vtklibxml2/config_cmake.h.in
--- vtk/Utilities/vtklibxml2/config_cmake.h.in	2016-03-07 17:38:32.265012000 -0500
+++ VTK5.10.1/Utilities/vtklibxml2/config_cmake.h.in	2016-03-07 16:38:00.419138400 -0500
@@ -250,7 +250,7 @@
 #cmakedefine _WINSOCKAPI_
 
 /* Win32 Std C name mangling work-around */
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
 # define snprintf _snprintf
 #endif
 
Only in vtk/Utilities/vtknetcdf: .gitattributes
diff -aur vtk/Utilities/vtktiff/CMakeLists.txt VTK5.10.1/Utilities/vtktiff/CMakeLists.txt
--- vtk/Utilities/vtktiff/CMakeLists.txt	2016-03-07 17:38:33.003980500 -0500
+++ VTK5.10.1/Utilities/vtktiff/CMakeLists.txt	2016-03-07 16:38:44.433278900 -0500
@@ -69,6 +69,7 @@
 CHECK_INCLUDE_FILES("malloc.h" HAVE_MALLOC_H)
 CHECK_INCLUDE_FILES("memory.h" HAVE_MEMORY_H)
 CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H)
+CHECK_INCLUDE_FILES("search.h" HAVE_SEARCH_H)
 CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H)
 CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H)
 CHECK_INCLUDE_FILES("strings.h" HAVE_STRINGS_H)
diff -aur vtk/Utilities/vtktiff/tif_config.h.in VTK5.10.1/Utilities/vtktiff/tif_config.h.in
--- vtk/Utilities/vtktiff/tif_config.h.in	2016-03-07 17:38:33.035179100 -0500
+++ VTK5.10.1/Utilities/vtktiff/tif_config.h.in	2016-03-07 16:39:25.525380800 -0500
@@ -70,6 +70,10 @@
 /* Define if you have POSIX threads libraries and header files. */
 #cmakedefine HAVE_PTHREAD
 
+/* Define to 1 if you have the <search.h> header file. */
+
+#cmakedefine HAVE_SEARCH_H @HAVE_SEARCH_H@
+
 /* Define to 1 if you have the `sqrt' function. */
 #cmakedefine HAVE_SQRT @HAVE_SQRT@
 
diff -aur vtk/Views/vtkParallelCoordinatesRepresentation.cxx VTK5.10.1/Views/vtkParallelCoordinatesRepresentation.cxx
--- vtk/Views/vtkParallelCoordinatesRepresentation.cxx	2016-03-07 17:38:33.269168600 -0500
+++ VTK5.10.1/Views/vtkParallelCoordinatesRepresentation.cxx	2016-03-07 17:50:44.259370200 -0500
@@ -80,6 +80,7 @@
 
 #include <vector>
 #include <vtksys/ios/sstream>
+#include <vtksys/stl/algorithm>
 
 vtkStandardNewMacro(vtkParallelCoordinatesRepresentation);
 


More information about the vtkusers mailing list