How to pass multiple arguments to ParaView extra CMake arguments using superbuild?

A colleague and I are trying to build a containarised version of ParaView. We use Alpine OS, but we came across some issues with netcdf and cgns incompatibility. We thought to switch it off, but we are having problems specifying more than one argument:

When configuring with cmake we use build variables describe here and pass:

cmake \
...
   -DPARAVIEW_EXTRA_CMAKE_ARGUMENTS="-DVTK_MODULE_ENABLE_VTK_IONetCDF='NO' -DVTK_MODULE_ENABLE_VTK_netcdf='NO' -DVTK_MODULE_USE_EXTERNAL_VTK_cgns='NO'" \
...

but this results in:

#11 951.0 CMake Error at VTK/CMake/vtkModule.cmake:421 (message):
#11 951.0   The `VTK_MODULE_ENABLE_VTK_IONetCDF` variable must be one of `YES`, `WANT`,
#11 951.0   `DONT_WANT`, `NO`, or `DEFAULT`.  Found `NO'
#11 951.0   -DVTK_MODULE_ENABLE_VTK_netcdf='NO'
#11 951.0   -DVTK_MODULE_USE_EXTERNAL_VTK_cgns='NO`.

Clearly the whole line is passed as the first argument value. We tried without apostrophes too. Can you please advise what’s the correct way of specifying multiple arguments?

1 Like

You should not quote NO keyword and use semicolon ( ;) as argument separator instead of space.

Documentation fix: https://gitlab.kitware.com/paraview/paraview-superbuild/-/merge_requests/1082

2 Likes