Commit 6a940b7e authored by Yves Starreveld's avatar Yves Starreveld

ENH: Remove hack that allowed VTK to build on OSX prior to 10.3 (broken stdlibc++ init routine)

ENH: WIll require 10.3 and gcc3.3
parent 993b2002
......@@ -150,9 +150,6 @@ IF(APPLE)
SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -fpascal-strings")
ENDIF(VTK_USE_CARBON)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(BUILD_SHARED_LIBS)
SET(VTK_APPLE_SHARED_FLAGS_NEEDED 1)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(APPLE)
IF(UNIX)
......
......@@ -199,10 +199,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
${VTK_BINARY_DIR} "")
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -18,18 +18,7 @@
#include "vtkCommand.h"
#include "vtkTimeStamp.h"
vtkCxxRevisionMacro(vtkObject, "1.89");
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{void oft_initCommon()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
vtkCxxRevisionMacro(vtkObject, "1.90");
// Initialize static member that controls warning display
static int vtkObjectGlobalWarningDisplay = 1;
......
......@@ -279,10 +279,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -17,22 +17,9 @@
#include "vtkObjectFactory.h"
#include "vtkPiecewiseFunction.h"
vtkCxxRevisionMacro(vtkCardinalSpline, "1.25");
vtkCxxRevisionMacro(vtkCardinalSpline, "1.26");
vtkStandardNewMacro(vtkCardinalSpline);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initFiltering()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
// Construct a Cardinal Spline.
vtkCardinalSpline::vtkCardinalSpline ()
{
......
......@@ -199,10 +199,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -22,21 +22,9 @@
#include "vtkPointData.h"
#include "vtkUnstructuredGrid.h"
vtkCxxRevisionMacro(vtkAppendFilter, "1.67");
vtkCxxRevisionMacro(vtkAppendFilter, "1.68");
vtkStandardNewMacro(vtkAppendFilter);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initGraphics()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
//----------------------------------------------------------------------------
vtkAppendFilter::vtkAppendFilter()
{
......
......@@ -114,10 +114,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
${VTK_BINARY_DIR} "")
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -27,22 +27,9 @@
#include "vtkRenderer.h"
#include "vtkStripper.h"
vtkCxxRevisionMacro(vtk3DSImporter, "1.37");
vtkCxxRevisionMacro(vtk3DSImporter, "1.38");
vtkStandardNewMacro(vtk3DSImporter);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initHybrid()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
static vtk3DSColour Black = {0.0, 0.0, 0.0};
static char obj_name[80] = "";
static vtk3DSColour fog_colour = {0.0, 0.0, 0.0};
......
......@@ -175,10 +175,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -20,25 +20,13 @@
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
vtkCxxRevisionMacro(vtkBMPReader, "1.47");
vtkCxxRevisionMacro(vtkBMPReader, "1.48");
vtkStandardNewMacro(vtkBMPReader);
#ifdef read
#undef read
#endif
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initIO()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
vtkBMPReader::vtkBMPReader()
{
this->Colors = NULL;
......
......@@ -145,10 +145,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -19,21 +19,9 @@
#include "vtkPointData.h"
#include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro(vtkBooleanTexture, "1.38");
vtkCxxRevisionMacro(vtkBooleanTexture, "1.39");
vtkStandardNewMacro(vtkBooleanTexture);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initImaging()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
vtkBooleanTexture::vtkBooleanTexture()
{
this->Thickness = 0;
......
......@@ -149,10 +149,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
${VTK_BINARY_DIR} "")
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -18,24 +18,11 @@
#include "vtkSource.h"
#include "vtkImageData.h"
vtkCxxRevisionMacro(vtkBranchExtentTranslator, "1.14");
vtkCxxRevisionMacro(vtkBranchExtentTranslator, "1.15");
vtkStandardNewMacro(vtkBranchExtentTranslator);
vtkCxxSetObjectMacro(vtkBranchExtentTranslator,OriginalSource,vtkImageData);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initParallel()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
//----------------------------------------------------------------------------
vtkBranchExtentTranslator::vtkBranchExtentTranslator()
{
......
......@@ -49,10 +49,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......
......@@ -39,22 +39,9 @@
#include "vtkPolyData.h"
#include "vtkTriangle.h"
vtkCxxRevisionMacro(vtkDecimate, "1.79");
vtkCxxRevisionMacro(vtkDecimate, "1.80");
vtkStandardNewMacro(vtkDecimate);
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initPatented()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
#define VTK_TOLERANCE 1.0e-05
#define VTK_MAX_TRIS_PER_VERTEX VTK_CELL_SIZE
......
......@@ -344,9 +344,6 @@ IF (VTK_WRAP_TCL)
vtkTkRenderWidget
vtkTkImageViewerWidget)
ENDIF (NOT VTK_DISABLE_TK_INIT)
IF (APPLE AND VTK_BUILD_SHARED_LIBS)
SET(Kit_TCL_EXTRA_SRCS ${Kit_TCL_EXTRA_SRCS} vtkOSXRenderingTclInit.c)
ENDIF (APPLE AND VTK_BUILD_SHARED_LIBS)
ENDIF (VTK_WRAP_TCL)
# -----------------------------------------------------------------
......@@ -360,10 +357,6 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS "-init _oft_init${KIT}")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
......@@ -436,14 +429,6 @@ ENDIF(LOCALUSERMACRODEFINED)
# End of common section
# -----------------------------------------------------------------
IF (VTK_WRAP_TCL)
IF (APPLE AND VTK_BUILD_SHARED_LIBS)
IF(VTK_APPLE_SHARED_FLAGS_NEEDED)
SET_TARGET_PROPERTIES(vtk${KIT}TCL PROPERTIES LINK_FLAGS "-init _oft_initRenOSXInit")
ENDIF(VTK_APPLE_SHARED_FLAGS_NEEDED)
ENDIF (APPLE AND VTK_BUILD_SHARED_LIBS)
ENDIF (VTK_WRAP_TCL)
IF (VTK_WRAP_PYTHON)
IF (TK_LIBRARY)
IF(NOT VTK_USE_COCOA)
......
......@@ -16,19 +16,7 @@
#include "vtkDataSet.h"
#include "vtkMath.h"
vtkCxxRevisionMacro(vtkAbstractMapper3D, "1.18");
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initRendering()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
vtkCxxRevisionMacro(vtkAbstractMapper3D, "1.19");
// Construct with initial range (0,1).
vtkAbstractMapper3D::vtkAbstractMapper3D()
......
......@@ -1068,8 +1068,8 @@ vtkTkRenderWidget_MakeRenderWindow(struct vtkTkRenderWidget *self)
// Position should be set, but only if winPtr properly initialized
//
// self->RenderWindow->SetPosition(winPtr->privatePtr->xOff,
// winPtr->privatePtr->yOff);
//self->RenderWindow->SetPosition(winPtr->privatePtr->xOff,
// winPtr->privatePtr->yOff);
self->RenderWindow->SetSize(self->Width, self->Height);
// Set the parent correctly and get the actual OSX window on the screen
......
......@@ -20,19 +20,6 @@
#include "vtkImageData.h"
//----- This hack needed to compile using gcc3 on OSX until new stdc++.dylib
#ifdef __APPLE__
extern "C"
{
void oft_initRenderingWidgets()
{
extern void _ZNSt8ios_base4InitC4Ev();
_ZNSt8ios_base4InitC4Ev();
}
}
#endif
//----------------------------------------------------------------------------
// Vtkrenderingpythontkwidgets_Init
// Called upon system startup to create the widget commands.
......
......@@ -18,9 +18,6 @@ MACRO(VTK_USE_INSTANTIATOR KIT CAPS_KIT)
EXPORT_MACRO VTK_${CAPS_KIT}_EXPORT
HEADER_LOCATION ${VTK_BINARY_DIR})
ENDIF (COMMAND VTK_MAKE_INSTANTIATOR2)
IF (APPLE)
SET (CMAKE_CXX_SHLIB_BUILD_FLAGS "-dynamiclib -init _oft_initIma")
ENDIF (APPLE)
ADD_LIBRARY(vtk${KIT}${VTK_VERSION} ${${KIT}_SRCS} ${Instantiator_SRCS})
ENDMACRO(VTK_USE_INSTANTIATOR KIT CAPS_KIT)
......
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