Skip to content

Commit

Permalink
#3088 support vtk 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fcooper8472 committed Feb 2, 2022
1 parent a18592d commit 2d47416
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
26 changes: 18 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,27 @@ if (Chaste_USE_VTK)

# Depending on the VTK version, we need different components. 5.x require the following
if (VTK_MAJOR_VERSION EQUAL 5)
find_package (VTK COMPONENTS vtkIO vtkCommon vtkGraphics z REQUIRED)
find_package(VTK COMPONENTS vtkIO vtkCommon vtkGraphics z REQUIRED)
# 6.0 and 6.1 require the following
elseif ((VTK_MAJOR_VERSION EQUAL 6) AND (VTK_MINOR_VERSION LESS 2))
find_package (VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkFiltersCore vtkFiltersGeneral vtkFiltersGeneric
vtkFiltersGeometry vtkFiltersModeling vtkFiltersSources vtkIOCore vtkIOGeometry
vtkIOLegacy vtkIOXML REQUIRED)
# 6.2 and up, up to and including 7.1, require the following
find_package(
VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkFiltersCore vtkFiltersGeneral vtkFiltersGeneric
vtkFiltersGeometry vtkFiltersModeling vtkFiltersSources vtkIOCore vtkIOGeometry vtkIOLegacy vtkIOXML
REQUIRED
)
# 6.2 and up, up to and including 8.x, require the following
elseif (VTK_MAJOR_VERSION LESS 9)
find_package(
VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkFiltersCore vtkFiltersGeneral vtkFiltersGeneric
vtkFiltersGeometry vtkFiltersModeling vtkFiltersSources vtkIOCore vtkIOGeometry vtkIOLegacy
vtkIOParallelXML vtkIOXML REQUIRED
)
# VTK 9.0 and above require the following
else ()
find_package (VTK COMPONENTS vtkCommonCore vtkCommonDataModel vtkFiltersCore vtkFiltersGeneral vtkFiltersGeneric
vtkFiltersGeometry vtkFiltersModeling vtkFiltersSources vtkIOCore vtkIOGeometry
vtkIOLegacy vtkIOParallelXML vtkIOXML REQUIRED)
find_package(
VTK COMPONENTS CommonCore CommonDataModel FiltersCore FiltersGeneral FiltersGeneric FiltersGeometry
FiltersModeling FiltersSources IOCore IOGeometry IOLegacy IOParallelXML IOXML REQUIRED
)
endif ()

add_definitions (-DCHASTE_VTK)
Expand Down
2 changes: 2 additions & 0 deletions mesh/src/reader/VtkMeshReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifdef CHASTE_VTK

#include <vtkCellTypes.h>

#include "VtkMeshReader.hpp"
#include "Exception.hpp"

Expand Down

0 comments on commit 2d47416

Please sign in to comment.