Building a code using Catalyst with cmake


I’m having troubles building a code that uses Catalyst. The code is built with cmake, so its CMakeLists.txt file has the following:

  find_package(ParaView 4.3 REQUIRED COMPONENTS vtkPVPythonCatalyst)
  set(PARAVIEW_LIBRARIES "vtkPVPythonCatalyst;vtkParallelMPI")

For this to work, apparently, I need to have -DParaView_DIR=<path/to/directory/containing/ParaViewConfig.cmake> when calling cmake.

I installed Catalyst 5.6.0 by downloading the Catalyst-v5.6.0-RC1-Base-Enable-Python-Essentials-Extras-Rendering-Base.tar.gz archive, untaring it, then calling the script as follows from a “build” directory:

./ ../Catalyst-v5.6.0-RC1-Base-Enable-Python-Essentials-Extras-Rendering-Base -DCMAKE_INSTALL_PREFIX=$HOME/catalyst

Then calling make and make install.

When I try to build my code by using -DParaView_DIR=$HOME/catalyst this doesn’t work, because the folder where Catalyst was installed apparently doesn’t contain ParaViewConfig.cmake. I searched within subfolder but couldn’t find it. This file however is present in the build directory, so I copy-pasted it into the install directory.
This didn’t work either: now cmake had another complaint:

CMake Error at /home/mdorier/catalyst-build/VTK/VTKConfig.cmake:114 (include):
  include could not find load file:


This happened because I removed the source folder. Putting the source folder back made everything work fine.

That being said, it’s not great to have to keep the source folder and the build folder in addition to the install folder just for cmake to be able to find ParaView.

Is there something I’m doing wrong or should this be improved?


You are on the right path ParaView_DIR should indeed be set to the dir containing ParaViewConfig.cmake. However, it’s not expected in the Catalyst subfolder it will be $HOME/catalyst/lib/cmake/paraview-5.6/.

Here’s what I did on my install of the same 5.6.0-RC1 catalyst source

find . | grep Config.cmake

Setting -DParaView_DIR=$HOME/catalyst/lib/cmake/paraview-5.6 should do the trick.

Indeed, that works. Thanks a lot!