SimVascular / svSolver

Separate repository for svSolver
16 stars 23 forks source link

Add CMake flag to use custom VTK build #121

Open ktbolt opened 1 year ago

ktbolt commented 1 year ago

It is sometimes required (e.g. on HPC clusters) to build svSolver using a custom VTK build. CMake may not be able to identify the correct VTK build so we need to use

find_package(VTK PATHS VTK_BULD_PATH REQUIRED)

Currently a user must edit the svSolver/Code/CMake/SimVascularExternals.cmake, comment some CMake commands and add the find_package command. It would be better to set the VTK_BULD_PATH variable from the cmake command line.

ktbolt commented 1 year ago

I have added the SV_VTK_LOCAL_PATH CMake flag to set the VTK build directory from the command line using for example

cmake -DSV_USE_LOCAL_VTK=ON -DSV_VTK_LOCAL_PATH=$HOME/vtk/install/ ..

This works on MacOS and Red Hat using a VTK build without graphics.

ktbolt commented 1 year ago

I also updated the svSolver README to describe how to use this flag.