Skip to content

Commit

Permalink
Merge pull request #3666 from roystgnr/vtk93_fix
Browse files Browse the repository at this point in the history
VTK 9.3 compatibility fix
  • Loading branch information
roystgnr authored Oct 24, 2023
2 parents e2e4855 + ff4e1c0 commit edc1058
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
14 changes: 12 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -55431,7 +55431,7 @@ then :
VTK_DIR=/usr
fi

VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h 2>/dev/null | tail -n 1) 2>/dev/null)
VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h $VTK_DIR/include/vtk*/vtkVersionMacros.h 2>/dev/null | tail -n 1) 2>/dev/null)
if test "x$VTK_INC" = "x"
then :

Expand Down Expand Up @@ -55503,7 +55503,7 @@ then :
vtkincFound=no;
ac_vtk_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${VTK_INC} ${CPPFLAGS}"
for ac_header in vtkConfigure.h
for ac_header in vtkConfigure.h
do :
ac_fn_cxx_check_header_compile "$LINENO" "vtkConfigure.h" "ac_cv_header_vtkConfigure_h" "$ac_includes_default"
if test "x$ac_cv_header_vtkConfigure_h" = xyes
Expand All @@ -55512,6 +55512,16 @@ then :
vtkincFound=yes
fi

done
for ac_header in vtkVersionMacros.h
do :
ac_fn_cxx_check_header_compile "$LINENO" "vtkVersionMacros.h" "ac_cv_header_vtkVersionMacros_h" "$ac_includes_default"
if test "x$ac_cv_header_vtkVersionMacros_h" = xyes
then :
printf "%s\n" "#define HAVE_VTKVERSIONMACROS_H 1" >>confdefs.h
vtkincFound=yes
fi

done
CPPFLAGS="${ac_vtk_save_CPPFLAGS}"

Expand Down
3 changes: 3 additions & 0 deletions include/libmesh_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@
/* Define to 1 if you have the <vtkConfigure.h> header file. */
#undef HAVE_VTKCONFIGURE_H

/* Define to 1 if you have the <vtkVersionMacros.h> header file. */
#undef HAVE_VTKVERSIONMACROS_H

/* Flag indicating headers and libraries for XDR IO are available */
#undef HAVE_XDR

Expand Down
6 changes: 4 additions & 2 deletions m4/vtk.m4
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ AC_DEFUN([CONFIGURE_VTK],
AS_IF([test "x$VTK_DIR" = "x"], [VTK_DIR=/usr])
dnl Look for VTK location in the environment, then default paths
VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h 2>/dev/null | tail -n 1) 2>/dev/null)
VTK_LS_CHECK=$(dirname $(ls -d $VTK_DIR/include/vtk*/vtkConfigure.h $VTK_DIR/include/vtk*/vtkVersionMacros.h 2>/dev/null | tail -n 1) 2>/dev/null)
AS_IF([test "x$VTK_INC" = "x"],
[
AS_IF([test "x$VTK_INCLUDE" != "x"], [AS_IF([test -d $VTK_INCLUDE], [VTK_INC=$VTK_INCLUDE])],
Expand Down Expand Up @@ -104,7 +104,9 @@ AC_DEFUN([CONFIGURE_VTK],
vtkincFound=no;
ac_vtk_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${VTK_INC} ${CPPFLAGS}"
AC_CHECK_HEADERS([vtkConfigure.h], [vtkincFound=yes])
dnl Look for vtkConfigure.h in old VTK, vtkVersionMacros.h in new
AC_CHECK_HEADERS([vtkConfigure.h], [vtkincFound=yes])
AC_CHECK_HEADERS([vtkVersionMacros.h], [vtkincFound=yes])
CPPFLAGS="${ac_vtk_save_CPPFLAGS}"
AS_IF([test "$vtkincFound" = "no"],
Expand Down
1 change: 0 additions & 1 deletion src/mesh/vtk_io.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "vtkIntArray.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkConfigure.h"
#include "vtkDoubleArray.h"
#include "vtkGenericCell.h"
#include "vtkPointData.h"
Expand Down

0 comments on commit edc1058

Please sign in to comment.