`PARAVIEW_BUILD_EDITION` has no impact on ccmake list

I am trying to understand the PARAVIEW_BUILD_EDITION keyword used in the build process and there is something that I find really puzzling:

ParaView/build.md at master · Kitware/ParaView · GitHub reads:

CANONICAL (default): Build modules necessary for standard ParaView build.

OK, so a default Paraview build has a large number of features activated, including support for png output and ffmpeg. However, if I run:

git clone --recursive https://gitlab.kitware.com/paraview/paraview-superbuild.git
cd paraview-superbuild
git checkout v5.9.1
git submodule update
cd ..

mkdir ParaView-5.9.1
cd ParaView-5.9.1

cmake -DPARAVIEW_BUILD_EDITION=CANONICAL \
-DENABLE_python3=ON \
../paraview-superbuild/

And then consult the build settings through ccmake . I get a list with almost everything deactivated, including png and ffmpeg.

In fact, the list is always the same regardless of the value I provide to PARAVIEW_BUILD_EDITION.

Is the list not representative of what is going to be built?

PARAVIEW_BUILD_EDITION controls which modules within the ParaView build itself are enabled/disabled. The superbuild, on the other hand is used to build external libraries together with ParaView. PARAVIEW_BUILD_EDITION does not impact the Superbuild. You have manually enable / disable external libraries you want the superbuild to build.

Ah so if, for example, I set ENABLE_mpi=ON in the superbuild it will download and compile mpich instead of using the system MPI that’s already there?

Yes. Unless you set USE_SYSTEM_xxx to ON.

Ah thank you, that makes sense now.
But then how can I customize the Paraview build itself when building through superbuild? Do, by chance, get any -DPARAVIEW_ENABLE_....=ON flags applied to superbuild used for building Paraview?

defer to @ben.boeckel , @cory.quammen for that one.

The superbuild will control what it can (e.g., it knows that it built ffmpeg and will therefore tell paraview about it). Same with any other projects which affect it (see the DEPENDS_OPTIONAL list). Basically, if the option you want to set is mentioned in projects/paraview.cmake, work with the superbuild to manipulate that flag.

For anything else, there is the superbuild’s PARAVIEW_EXTRA_CMAKE_ARGUMENTS variable (visible in the advanced view) which allows you to pass other cmake flags (;-separated) to ParaView’s configuration.

1 Like

Thank you for your elaborate answer which was really helpful.

How about non-cmake flags, like -DEGL_INCLUDE_DIR … will they be applied in the building of Paraview? For example:

cmake -GNinja \
-DEGL_INCLUDE_DIR=/usr/include \
-DEGL_LIBRARY=/usr/lib64/libEGL.so \
-DEGL_opengl_LIBRARY=/usr/lib64/libOpenGL.so \
../paraview-superbuild/

Okay, probably so, becuase
superbuild/paraview/build/CMakeCache.txt
then has the lines

EGL_INCLUDE_DIR:PATH=/usr/include
EGL_LIBRARY:FILEPATH=/usr/lib64/libEGL.so
EGL_opengl_LIBRARY:FILEPATH=/usr/lib64/libOpenGL.so

in it.

They aren’t passed directly; I suspect it is just ParaView finding the same paths that you passed in on its own. You can see all of the flags passed to ParaView’s configure in superbuild/sb-paraview-configure.cmake.