/builds/gitlab-kitware-sciviz-ci/Documentation/dev/build.md
Go to the documentation of this file.
1 # Building ParaView
2 
3 This page describes how to build and install ParaView. It covers building for
4 development, on both Linux and Windows. Please Note that Linux (x86_64), Windows (x86_64)
5 and macOS (x86_64 and arm64) version are built and tested by our continuous
6 integration system and are considered supported environments.
7 
8 Any other environnements and architecture (including Cygwin, MingGW, PowerPC) are considered
9 non-officially supported, however, patches to fix problems with these platforms will
10 be considered for inclusion.
11 
12 ParaView depends on several open source tools and libraries such as Python, Qt,
13 CGNS, HDF5, etc. Some of these are included in the ParaView source itself
14 (e.g., HDF5), while others are expected to be present on the machine on which
15 ParaView is being built (e.g., Python, Qt).
16 
17 The first section is a getting started guide by OS that is very helpful if you have never
18 built ParaView before and do not know which options you need.
19 If you are looking for the generic help, please read the [Complete Compilation Guide](#complete-compilation-guide)
20 
21 ## Getting Started Guide
22 This is a section intended to help those that have never built ParaView before, are not
23 experienced with compilation in general or have no idea which option they may need when building ParaView.
24 If you follow this guide, you will be able to compile and run a standard version of ParaView
25 for your operating system. It will be built with the Python wrapping, MPI capabilities and multithreading capabilities.
26 
27  * If you are using a Linux distribution, please see [the Linux part](#linux),
28  * If you are using Microsoft Windows, please see [the Windows part](#windows),
29  * If you are using macOS, please see [the macOS part](#macos),
30  * If you are using another OS, feel free to provide compilation steps.
31 
32 ### Linux
33 
34 #### Dependencies
35 Please run the command in a terminal to install the following dependencies depending of your linux distribution.
36 
37 ##### Ubuntu 22.04 LTS / Debian 12
38 
39 `sudo apt-get install git cmake build-essential libgl1-mesa-dev libxt-dev libqt5x11extras5-dev libqt5help5 qttools5-dev qtxmlpatterns5-dev-tools libqt5svg5-dev python3-dev python3-numpy libopenmpi-dev libtbb-dev ninja-build qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools`
40 
41 ##### Ubuntu 18.04 LTS / Debian 10
42 `sudo apt-get install git cmake build-essential libgl1-mesa-dev libxt-dev qt5-default libqt5x11extras5-dev libqt5help5 qttools5-dev qtxmlpatterns5-dev-tools libqt5svg5-dev python3-dev python3-numpy libopenmpi-dev libtbb-dev ninja-build`
43 
44 ##### Centos 7
45 
46 ###### CMake
47 Download and install [cmake][cmake-download]) as the packaged version is not enough considering that
48 CMake 3.12 or higher is needed.
49 
50 ###### Others
51 `sudo yum install python3-devel openmpi-devel mesa-libGL-devel libX11-devel libXt-devel qt5-qtbase-devel qt5-qtx11extras-devel qt5-qttools-devel qt5-qtxmlpatterns-devel tbb-devel ninja-build git`
52 
53 ###### Environment
54 ```sh
55 alias ninja=ninja-build
56 export PATH=$PATH:/usr/lib64/openmpi/bin/
57 ```
58 
59 ##### ArchLinux
60 `sudo pacman -S base-devel ninja openmpi tbb qt python python-numpy cmake`
61 
62 ##### Other distribution
63 If you are using another distribution, please try to adapt the package list.
64 Feel free to then provide it so we can integrate it in this guide by creating an [issue][paraview-issues].
65 
66 #### Build
67 
68 To build ParaView development version (usually refered as "master"), please run the following commands in a terminal:
69 ```sh
70 git clone --recursive https://gitlab.kitware.com/paraview/paraview.git
71 mkdir paraview_build
72 cd paraview_build
73 cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release ../paraview
74 ninja
75 ```
76 
77 To build a specific ParaView version, eg: v5.9.1, please run the following commands in a terminal while replacing "tag" by the version you want to build
78 ```sh
79 git clone https://gitlab.kitware.com/paraview/paraview.git
80 mkdir paraview_build
81 cd paraview
82 git checkout tag
83 git submodule update --init --recursive
84 cd ../paraview_build
85 cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release ../paraview
86 ninja
87 ```
88 
89 #### Run
90 Double click on the paraview executable in the `/bin` directory or run in the previous terminal
91 
92 ```sh
93 ./bin/paraview
94 ```
95 
96 ### macOS
97 These instructions have worked on a mid 2023 MacMini with an M2 chipset on macOS Ventura.
98 
99 #### Install Homebrew
100 Please run the command in a terminal to install the following dependencies on your Mac via [Homebrew](https://brew.sh/) and add the relevant environment variables for brew.
101 ```zsh
102 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
103 (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
104 eval "$(/opt/homebrew/bin/brew shellenv)"
105 ```
106 ##### Install dependencies (largely following the Ubuntu steps for Linux)
107 `brew install open-mpi cmake mesa tbb ninja gdal qt5`
108 
109 ##### Set build environment
110 ```sh
111 echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc
112 echo 'export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib"' >> ~/.zshrc
113 echo 'export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"' >> ~/.zshrc
114 source ~/.zshrc
115 ```
116 
117 #### Build
118 
119 To build a specific ParaView version, eg: v5.11.1, please run the following commands in a terminal
120 ```sh
121 git clone https://gitlab.kitware.com/paraview/paraview.git
122 mkdir paraview_build
123 cd paraview
124 git checkout v5.11.1
125 git submodule update --init --recursive
126 cd ../paraview_build
127 cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release -DPARAVIEW_ENABLE_GDAL=ON ../paraview
128 ninja
129 ```
130 
131 #### Run
132 Double click on the paraview executable in the `/bin` directory or run in the previous terminal
133 
134 ```sh
135 ./bin/paraview.app/Contents/MacOS/paraview
136 ```
137 
138 ### Windows
139 
140 Note: The following steps concerning Visual Studio 2019 can also be applied to newer versions.
141 If so, be sure to use the respective Qt Version (e.g. for VS 2022, use msvc2022_64) and the Native Tools Command Prompt.
142 
143 #### Dependencies
144  * Download and install [git bash for windows][gitforwindows]
145  * Download and install [cmake][cmake-download]
146  * Download and install [Visual Studio 2019 Community Edition][visual-studio]
147  * Download [ninja-build][ninja] and drop `ninja.exe` in `C:\Windows\`
148  * Download and install both `msmpisetup.exe` and `msmpisdk.msi` from [Microsoft MPI][msmpi]
149  * Download and install [Python for Windows][pythonwindows], make sure to add the path to your Python installation folder to the `PATH` environnement variable.
150  * Download and install [Qt 5.15.3][qt-download-5.15.3] for Windows, make sure to check the MSVC 2019 64-bit component during installation.
151  * Make sure to add `C:\Qt\Qt5.15.3\5.15.3\msvc2019_64\bin` to your `PATH` environment variable.
152  * You may also need to add an environment variable `QT_QPA_PLATFORM_PLUGIN_PATH`: `C:\Qt\Qt5.15.3\5.15.3\msvc2019_64\plugins\platforms`.
153 
154 #### Recover the source
155  * Open git bash
156  * To build ParaView development version (usually referred to as `master`), run the following commands:
157 
158 ```sh
159 cd C:
160 mkdir pv
161 cd pv
162 git clone --recursive https://gitlab.kitware.com/paraview/paraview.git
163 mv paraview pv
164 mkdir pvb
165 ```
166 
167  * Or, to build a specific ParaView version, eg: v5.9.1, please run the following commands while replacing "tag" by the version you want to build
168 
169 ```sh
170 cd C:
171 mkdir pv
172 cd pv
173 git clone https://gitlab.kitware.com/paraview/paraview.git
174 mv paraview pv
175 mkdir pvb
176 cd pv
177 git checkout tag
178 git submodule update --init --recursive
179 ```
180 
181 #### Build
182 
183  * Open VS2019 x64 Native Tools Command Prompt and run the following commands
184 ```sh
185 cd C:\pv\pvb
186 cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=STDThread -DCMAKE_BUILD_TYPE=Release ..\pv
187 ninja
188 ```
189 
190 Note: If you want to build ParaView with `CMAKE_BUILD_TYPE=Debug` you also need to add the option `-DPARAVIEW_WINDOWS_PYTHON_DEBUGGABLE=ON`.
191 
192 #### Run
193 
194  * Double click on the `C:\pv\pvb\bin\paraview.exe` executable
195 
196 ## Complete Compilation Guide
197 
198 ### Obtaining the source
199 
200 To obtain ParaView's sources locally, clone this repository using
201 [Git][git].
202 
203 ```sh
204 git clone --recursive https://gitlab.kitware.com/paraview/paraview.git
205 ```
206 
207 ### Building
208 
209 ParaView supports all of the common generators supported by CMake. The Ninja,
210 Makefiles, and Visual Studio generators are the most well-tested however.
211 
212 #### Prerequisites
213 
214 ParaView only requires a few packages to build with its basic capabilities. However,
215 specific features may require additional packages to be provided to ParaView's
216 build configuration.
217 
218 Required:
219 
220  * [CMake][cmake]
221  - Version 3.12 or newer, however, the latest version is always recommended
222  * Supported compiler
223  - GCC 4.8 or newer
224  - Intel 17 or newer
225  - IBM XL 16.1 or newer
226  - Clang 4 or newer
227  - Xcode 9 or newer
228  - Visual Studio 2019 or newer
229 
230 Optional dependencies:
231 
232  * [Python][python]
233  - At least 3.3 is required
234  * [Qt5][qt]
235  - Version 5.12 or newer. Qt6 support is experimental and not tested yet.
236 
237 ##### Installing CMake
238 
239 CMake is a tool that makes cross-platform building simple. On several systems
240 it will probably be already installed or available through system package
241 management utilities. If it is not, there are precompiled binaries available on
242 [CMake's download page][cmake-download].
243 
244 ##### Installing Qt
245 
246 ParaView uses Qt to provide its graphical user interface. Precompiled binaries are available on
247 [Qt's website][qt-download].
248 
249 Note that on Windows, the compiler used for building ParaView must match the
250 compiler version used to build Qt.
251 
252 The Linux packages for Qt 5.9 use a version of protobuf that may conflict with
253 that used by ParaView. If, when running ParaView, error messages about a
254 mismatch in protobuf versions appears, moving the `libqgtk3.so` plugin out of
255 the `plugins/platformthemes` directory has been sufficient in the past.
256 
257 #### Optional Additions
258 
259 ##### Download And Install ffmpeg (`.avi`) movie libraries
260 
261 When the ability to write `.avi` files is desired, and writing these files is
262 not supported by the OS, ParaView can use the ffmpeg library. This is generally
263 true for Linux. Source code for ffmpeg can be obtained from [its
264 website][ffmpeg].
265 
266 ##### MPI
267 
268 To run ParaView in parallel, an [MPI][mpi] implementation is required. If an
269 MPI implementation that exploits special interconnect hardware is provided on
270 your system, we suggest using it for optimal performance. Otherwise, on
271 Linux/Mac, we suggest either [OpenMPI][openmpi] or [MPICH][mpich]. On Windows,
272 [Microsoft MPI][msmpi] is required.
273 
274 ##### Python
275 
276 In order to use Python scripting, [Python][python] is required (version 3.3 or later). Python
277 is also required in order to build ParaViewWeb support.
278 
279 ##### OSMesa
280 
281 Off-screen Mesa can be used as a software-renderer for running ParaView on a
282 server without hardware OpenGL acceleration. This is usually available in
283 system packages on Linux. For example, the `libosmesa6-dev` package on Debian
284 and Ubuntu. However, for older machines, building a newer version of Mesa is
285 likely necessary for bug fixes and support for features needed by ParaView.
286 Its source and build instructions can be found on [its website][mesa].
287 
288 ### Creating the Build Environment
289 
290 #### Linux (Ubuntu/Debian)
291 
292  * `sudo apt install` the following packages:
293  - `build-essential`
294  - `cmake`
295  - `mesa-common-dev`
296  - `mesa-utils`
297  - `freeglut3-dev`
298  - `ninja-build`
299  - `ninja` is a speedy replacement for `make`, highly recommended.
300 
301 *Note*: If you are using an Ubuntu-provided compiler, there is a known issue
302 with the optional Python linking. This case is hard to auto-detect, so if
303 undefined symbol errors related to Python symbols arise, setting
304 `vtk_undefined_symbols_allowed=OFF` may resolve the errors. If it does not,
305 please file a new [issue][paraview-issues].
306 
307 #### Windows
308 
309  * [Visual Studio 2019 Community Edition][visual-studio]
310  * Use "x64 Native Tools Command Prompt" for the installed Visual Studio
311  version to configure with CMake and to build with ninja.
312  * Get [ninja][ninja]. Unzip the binary and put it in `PATH`.
313 
314 ### Building
315 
316 In order to build, CMake requires two steps, configure and build. ParaView
317 itself does not support what are known as in-source builds, so the first step
318 is to create a build directory.
319 
320 !!! note
321  On Windows, there have historically been issues if the path to the
322  build directory is too long. These issues should have been addressed in
323  more recent versions of ParaView's build system, but they may appear again. If you
324  see errors related to header files not being found at paths on your file
325  system that do exist, please report them to [the issue
326  tracker][paraview-issues].
327 
328 ```sh
329 mkdir -p paraview/build
330 cd paraview/build
331 ccmake ../path/to/paraview/source # -GNinja may be added to use the Ninja generator
332 ```
333 
334 CMake's GUI has input entries for the build directory and the generator
335 already. Note that on Windows, the GUI must be launched from a "Native Tools
336 Command Prompt" available with Visual Studio in the start menu.
337 
338 #### Build Settings
339 
340 ParaView has a number of settings available for its build. These are categorized
341 as build options, capability options, feature options and miscellaneous options.
342 
343 #### Build Options
344 
345 Options that impact the build begin with the prefix `PARAVIEW_BUILD_`.
346 Common variables to modify include:
347 
348  * `PARAVIEW_BUILD_SHARED_LIBS` (default `ON`): If set, shared libraries will
349  be built. This is usually what is wanted.
350 
351 Less common, but variables which may be of interest to some:
352 
353  * `PARAVIEW_BUILD_EDITION` (default `CANONICAL`): Choose which features to
354  enable in this build. This is useful to generate ParaView builds with
355  limited features. More on this later.
356  * `PARAVIEW_ENABLE_EXAMPLES` (default `OFF`): If set, ParaView's example code
357  will be added as tests to the ParaView test suite. These tests may be built
358  and run using the `paraview-examples` target.
359  * `PARAVIEW_BUILD_DEVELOPER_DOCUMENTATION` (default `OFF`): If set, the HTML
360  documentation for ParaView's C++, Python, and proxies will be generated.
361  * `PARAVIEW_PLUGIN_DISABLE_XML_DOCUMENTATION` (default `OFF`): Whether
362  plugin XML documentation is forcefully disabled.
363  * `PARAVIEW_BUILD_TESTING` (default `OFF`): Whether to build tests or not.
364  Valid values are `OFF` (no testing), `DEFAULT` (enable tests which have all
365  test dependencies satisfied), `WANT` (enable test dependencies as possible;
366  see vtk/vtk#17509), and `ON` (enable all tests; may error out if features
367  otherwise disabled are required by test code).
368  * `PARAVIEW_BUILD_VTK_TESTING` (default `OFF`): Whether to build tests for the
369  VTK codebase built by ParaView. Valid values are same as
370  `PARAVIEW_BUILD_TESTING`.
371  * `PARAVIEW_ENABLE_CATALYST` (default `OFF`): Whether to build the ParaView
372  implementation of Catalyst.
373 
374 More advanced build options are:
375 
376  * `PARAVIEW_BUILD_ALL_MODULES` (default `OFF`): If set, ParaView will enable
377  all modules not disabled by other features.
378  * `PARAVIEW_BUILD_LEGACY_REMOVE` (default `OFF`): Remove legacy / deprecated
379  code.
380  * `PARAVIEW_BUILD_LEGACY_SILENT` (default `OFF`): Silence all legacy
381  / deprecated code messages.
382  * `PARAVIEW_BUILD_WITH_EXTERNAL` (default `OFF`): When set to `ON`, the build
383  will try to use external copies of all included third party libraries unless
384  explicitly overridden.
385  * `PARAVIEW_BUILD_WITH_KITS` (default `OFF`; requires
386  `PARAVIEW_BUILD_SHARED_LIBS`): Compile ParaView into a smaller set of
387  libraries. Can be useful on platforms where ParaView takes a long time to
388  launch due to expensive disk access.
389  * `PARAVIEW_BUILD_ID` (default `""`): A build ID for the ParaView build. It
390  can be any arbitrary value which can be used to indicate the provenance of
391  ParaView.
392  * `PARAVIEW_GENERATE_SPDX` (default `OFF`): When compiling ParaView, generate
393  a SPDX file for each of ParaView modules containing license and copyright
394  information.
395 
396 #### Capability settings
397 
398 These settings control capabitities of the build. These begin with the prefix
399 `PARAVIEW_USE_`. The common variables to modify include:
400 
401  * `PARAVIEW_USE_QT` (default `ON`): Builds the `paraview` GUI application.
402  * `PARAVIEW_USE_MPI` (default `OFF`): Whether MPI support will be available
403  or not.
404  * `PARAVIEW_USE_PYTHON` (default `OFF`): Whether Python
405  support will be available or not.
406 
407 Less common, but potentially useful variables are:
408 
409  * `PARAVIEW_USE_VTKM` (default `ON`): Whether VTK-m based filters are enabled.
410  * `PARAVIEW_USE_FORTRAN` (default `ON` if Fortran compiler found): Enable
411  Fortran support for Catalyst libraries.
412  * `PARAVIEW_USE_CUDA` (default `OFF`): Enable CUDA support in ParaView.
413  * `PARAVIEW_USE_HIP` (default `OFF`, requires CMake >= 3.21 and NOT
414  `PARAVIEW_USE_CUDA`): Enable HIP support in ParaView.
415  * `PARAVIEW_LOGGING_TIME_PRECISION` (default `3`): Change the precision of
416  times output. Possible values are 3 for ms, 6 for us, 9 for ns.
417  * `PARAVIEW_USE_SERIALIZATION` (default `OFF`): Whether VTK serialization is enabled.
418 
419 #### Feature settings
420 
421 These settings control optional features. These begin with the prefix
422 `PARAVIEW_ENABLE_`. The common variables to modify include:
423 
424  * `PARAVIEW_ENABLE_RAYTRACING` (default `OFF`): Enable ray-tracing support
425  with OSPray and/or OptiX. Requires appropriate external libraries.
426  * `PARAVIEW_ENABLE_WEB` (default `OFF`; requires `PARAVIEW_USE_PYTHON`):
427  Whether ParaViewWeb support will be available or not.
428 
429 These settings are used for translating purpose:
430  * `PARAVIEW_BUILD_TRANSLATIONS` (default `OFF`): Enable translation
431  files update and generation.
432  * `PARAVIEW_TRANSLATIONS_DIRECTORY` (default `${CMAKE_BINARY_DIR}/Translations`):
433  Path where the translation files will be generated on build.
434 
435 More advanced / less common options include:
436 
437  * `PARAVIEW_ENABLE_VISITBRIDGE` (default `OFF`): Enable support for VisIt
438  readers.
439  * `PARAVIEW_ENABLE_NVPIPE` (default `OFF`): Use [nvpipe][nvpipe] image
440  compression that uses the GPU when communicating. Requires CUDA and an NVIDIA GPU.
441  * `PARAVIEW_ENABLE_GDAL` (default `OFF`): Enable support for reading GDAL
442  files.
443  * `PARAVIEW_ENABLE_LAS` (default `OFF`): Enable support for reading LAS
444  files.
445  * `PARAVIEW_ENABLE_OPENTURNS` (default `OFF`): Enable support for reading
446  OpenTURNS files.
447  * `PARAVIEW_ENABLE_PDAL` (default `OFF`): Enable support for reading PDAL
448  files.
449  * `PARAVIEW_ENABLE_MOTIONFX` (default `OFF`): Enable support for reading
450  MotionFX files.
451  * `PARAVIEW_ENABLE_MOMENTINVARIANTS` (default `OFF`): Enable
452  MomentInvariants filters.
453  * `PARAVIEW_ENABLE_LOOKINGGLASS` (default `OFF`): Enable support for LookingGlass displays.
454  * `PARAVIEW_ENABLE_XDMF2` (default `OFF`): Enable support for reading Xdmf2
455  files.
456  * `PARAVIEW_ENABLE_XDMF3` (default `OFF`): Enable support for reading Xdmf3
457  files.
458  * `PARAVIEW_ENABLE_FFMPEG` (default `OFF`; not available on Windows): Enable
459  FFmpeg support.
460  * `PARAVIEW_ENABLE_COSMOTOOLS` (default `OFF`; requires `PARAVIEW_USE_MPI`
461  and not available on Windows): Enable support for CosmoTools which includes
462  GenericIO readers and writers as well as some point cloud algorithms.
463  * `PARAVIEW_ENABLE_CGNS_READER` (default `ON` for CANONICAL builds, `OFF` for
464  non-CANONICAL builds): Enable support for reading CGNS files. When building
465  ParaView for e.g. CATALYST, this option allows building support for reading
466  CGNS files. It will also build CGNSReader dependencies: HDF5 and CGNS.
467  * `PARAVIEW_ENABLE_CGNS_WRITER` (default `ON` for CANONICAL builds, `OFF` for
468  non-CANONICAL builds): Enable support for writing CGNS files. When building
469  ParaView for e.g. CATALYST, this option allows building support for writing
470  CGNS files. It will also build CGNSReader dependencies: HDF5 and CGNS. If
471  `PARAVIEW_ENABLE_MPI` is `ON`, the parallel CGNS writer will also be built.
472  * `PARAVIEW_ENABLE_OCCT` (default `OFF`): Enable support for reading OpenCascade
473  file formats such as STEP and IGES.
474 
475 #### Plugin settings
476 
477 ParaView includes several optional plugins that can be enabled and disabled using the
478 following options:
479 
480  * `PARAVIEW_PLUGINS_DEFAULT` (default `ON`): Pass this flag to the command
481  line using `-DPARAVIEW_PLUGINS_DEFAULT=OFF` before the first cmake run to
482  disable all plugins by default. Note this has no impact after the first
483  cmake configure and hence must be passed on the command line itself.
484  * `PARAVIEW_PLUGIN_ENABLE_<name>` (default varies): Whether to enable a
485  plugin or not.
486  * `PARAVIEW_PLUGIN_AUTOLOAD_<name>` (default `OFF`): Whether to autoload a
487  plugin at startup or not. Note that this affects all clients linking to
488  ParaView's plugin target.
489 
490 #### Miscellaneous settings
491 ParaView uses VTK's module system to control its build. This infrastructure
492 provides a number of variables to control modules which are not otherwise
493 controlled by the other options provided.
494 
495  * `VTK_MODULE_USE_EXTERNAL_<name>` (default depends on
496  `PARAVIEW_BUILD_WITH_EXTERNAL`): Use an external source for the named third-party
497  module rather than the copy contained within the ParaView source tree.
498  * `VTK_MODULE_ENABLE_<name>` (default `DEFAULT`): Change the build settings
499  for the named module. Valid values are those for the module system's build
500  settings (see below).
501  * `VTK_GROUP_ENABLE_<name>` (default `DEFAULT`): Change the default build
502  settings for modules belonging to the named group. Valid values are those
503  for the module system's build settings (see below).
504 
505 For variables that use the module system's build settings, the valid values are as follows:
506 
507  * `YES`: Require the module to be built.
508  * `WANT`: Build the module if possible.
509  * `DEFAULT`: Use the settings by the module's groups and
510  `PARAVIEW_BUILD_ALL_MODULES`.
511  * `DONT_WANT`: Don't build the module unless required as a dependency.
512  * `NO`: Do not build the module.
513 
514 If any `YES` module requires a `NO` module, an error is raised.
515 
516 More advanced options:
517 
518  * `PARAVIEW_INITIALIZE_MPI_ON_CLIENT` (default `ON`; requires
519  `PARAVIEW_USE_MPI`): Initialize MPI on client processes by default.
520  * `PARAVIEW_USE_QTHELP` (default `ON`; requires `PARAVIEW_USE_QT`): Use Qt's
521  help infrastructure for runtime documentation.
522  * `PARAVIEW_VERSIONED_INSTALL` (default `ON`): Whether to add version numbers
523  to ParaView's include and plugin directories in the install tree.
524  * `PARAVIEW_CUSTOM_LIBRARY_SUFFIX` (default depends on
525  `PARAVIEW_VERSIONED_INSTALL`): The custom suffix for libraries built by
526  ParaView. Defaults to either an empty string or `pvX.Y` where `X` and `Y`
527  are ParaView's major and minor version components, respectively.
528  * `PARAVIEW_INSTALL_DEVELOPMENT_FILES` (default `ON`): If set, ParaView will
529  install its headers, CMake API, etc. into its install tree for use.
530  * `PARAVIEW_RELOCATABLE_INSTALL` (default `ON`): If set, the install tree
531  will be relocatable to another path or machine. External dependencies
532  needed by ParaView which are in non-standard locations may need manual
533  settings in ParaView-using projects (those which share an install prefix
534  with ParaView should be OK though). If unset, the install tree will include
535  hints for the location of its dependencies which may include
536  build-machine-specific paths in the install tree.
537  * `PARAVIEW_SERIAL_TESTS_USE_MPIEXEC` (default `OFF`): Used on HPC to run
538  serial tests on compute nodes. If set, it prefixes serial tests with
539  "${MPIEXEC_EXECUTABLE}" "${MPIEXEC_NUMPROC_FLAG}" "1" ${MPI_PREFLAGS}
540  * `PARAVIEW_SKIP_CLANG_TIDY_FOR_VTK` (defaults `ON`; requires
541  `CMAKE_<LANG>_CLANG_TIDY`): If set, any `clang-tidy` settings will be
542  cleared for the internal VTK build.
543  * `PARAVIEW_TEST_DIR`: Used on HPC to set the test directory (default is
544  "${CMAKE_BINARY_DIR}/Testing/Temporary") to a location that is writable from
545  the compute nodes. Typically the user home directory is not.
546  * `PARAVIEW_LINKER_FATAL_WARNINGS`: Specify if linker warnings must
547  be considered as errors
548  * `PARAVIEW_EXTRA_COMPILER_WARNINGS`: Add compiler flags to do
549  stricter checking when building debug
550 
551 <!--
552 These variables should be documented once they're effective again. Note that
553 various settings have a dependency on this that is not mentioned since the
554 option doesn't "exist" yet.
555 
556  * `PARAVIEW_USE_EXTERNAL_VTK` (default `OFF`): Use an externally provided
557  VTK. Note that ParaView has fairly narrow requirements for the VTK it can
558  use, so only very recent versions are likely to work.
559 -->
560 
561 ## Building editions
562 
563 A typical ParaView build includes several modules and dependencies. While these
564 are necessary for a fully functional application, there are cases (e.g. in situ
565 use-cases) where a build with limited set of features is adequate. ParaView build supports
566 this using the `PARAVIEW_BUILD_EDITION` setting. Supported values for this setting are:
567 
568 * `CORE`: Build modules necessary for core ParaView functionality.
569  This does not include rendering.
570 * `RENDERING`: Build modules necessary for supporting rendering including views
571  and representations. This includes everything in `CORE`.
572 * `CATALYST`: Build all modules necessary for in situ use cases without
573  rendering and optional components like NetCDF- and HDF5-based readers and
574  writers.
575 * `CATALYST_RENDERING`: Same as `CATALYST` but with rendering supported added.
576 * `CANONICAL` (default): Build modules necessary for standard ParaView build.
577 
578 ## Debugging facilities
579 
580 ParaView's build is fairly complicated, so a few debugging facilities are
581 provided.
582 
583 ### General CMake
584 
585 CMake provides the `--trace-expand` flag which causes CMake to log all commands
586 that it executes with variables expanded. This can help to trace logic and data
587 through the configure step.
588 
589 Debugging `Find` modules can be done using the `--debug-find` flag (introduced
590 in CMake 3.17) to determine what CMake's `find_` commands are doing.
591 
592 ### VTK Modules
593 
594 VTK's module system debugging facilities may be controlled by using the
595 following flags:
596 
597  * `ParaView_DEBUG_MODULE` (default `OFF`): If enabled, debugging is enabled.
598  Specific portions of the module system may be debugged using the other
599  flags.
600  * `ParaView_DEBUG_MODULE_ALL` (default `OFF`): Enable all debugging messages.
601  * `ParaView_DEBUG_MODULE_building` (default `OFF`): Log when modules are
602  being built.
603  * `ParaView_DEBUG_MODULE_enable` (default `OFF`): Log why modules are
604  enabled.
605  * `ParaView_DEBUG_MODULE_kit` (default `OFF`): Log information about
606  discovered kits.
607  * `ParaView_DEBUG_MODULE_module` (default `OFF`): Log information about
608  discovered modules.
609  * `ParaView_DEBUG_MODULE_provide` (default `OFF`): Log why a module is being
610  built or not.
611  * `ParaView_DEBUG_MODULE_testing` (default `OFF`): Log testing for VTK
612  modules.
613 
614 ### ParaView Plugins
615 
616 ParaView's plugin system has a similar setup:
617 
618  * `ParaView_DEBUG_PLUGINS` (default `OFF`): If enabled, debugging is enabled.
619  Specific portions of the plugin system may be debugged using the other
620  flags.
621  * `ParaView_DEBUG_PLUGINS_ALL` (default `OFF`): Enable all debugging messages.
622  * `ParaView_DEBUG_PLUGINS_building` (default `OFF`): Log when plugins are
623  being built.
624  * `ParaView_DEBUG_PLUGINS_plugin` (default `OFF`): Log information about
625  discovered plugins.
626 
627 ### Building documentation
628 
629 The following targets are used to build documentation for ParaView:
630 
631  * `ParaViewDoxygenDoc` - build the doxygen documentation from ParaView's C++ source files.
632  * `ParaViewPythonDoc` - build the documentation from ParaView's Python source files.
633  * `ParaViewDoc-TGZ` - build a gzipped tarball of ParaView documentation.
634 
635 ## Using spack
636 
637 [Spack][spack] is a package manager for supercomputers, Linux and macOS. ParaView is one of
638 the packages available in Spack. To install ParaView from spack, you can use:
639 
640 ```
641 spack install paraview
642 ```
643 
644 Please refer to [Spack documentation][spack-docs] for ways of customizing the install,
645 including choosing the version and/or variant to build. Based on the version chosen,
646 spack will download appropriate ParaView source and build it.
647 
648 To make it easier to build ParaView using spack from an existing source checkout, we have included
649 relevant spack `package.yaml` files within the ParaView codebase itself. This
650 also makes it easier to keep the spack package up-to-date with any changes to
651 the ParaView buildsystem. With every release (and as frequently as required), we
652 will push the changes to the ParaView paraview.yaml file upstream to the
653 official spack repository.
654 
655 To build your existing source checkout of ParaView using Spack, here are the
656 steps:
657 
658 ```bash
659 # assuming you've installed spack as documented in spack docs
660 # and activate the spack environment appropriately
661 
662 # add custom paraview/package.yaml
663 > spack repo add $PARAVIEW_SOURCE_DIR/Utilities/spack/repo
664 
665 # use info to confirm that the paraview package is available
666 # only one version should be available
667 > spack info paraview
668 
669 # install similar to any other spack package
670 # e.g. following command installs osmesa-capable ParaView
671 # with mpich
672 
673 > spack install paraview+osmesa^mesa~glx^mpich
674 ```
675 
676 [cmake-download]: https://cmake.org/download
677 [cmake]: https://cmake.org
678 [ffmpeg]: https://ffmpeg.org
679 [git]: https://git-scm.org
680 [gitforwindows]: https://gitforwindows.org/
681 [mesa]: https://www.mesa3d.org
682 [mpi]: https://www.mcs.anl.gov/research/projects/mpi
683 [mpich]: https://www.mpich.org
684 [msmpi]: https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi
685 [ninja]: https://github.com/ninja-build/ninja/releases
686 [nvpipe]: https://github.com/NVIDIA/NvPipe
687 [openmpi]: https://www.open-mpi.org
688 [paraview-issues]: https://gitlab.kitware.com/paraview/paraview/-/issues
689 [python]: https://python.org
690 [pythonwindows]: https://www.python.org/downloads/windows/
691 [qt-download]: https://download.qt.io/official_releases/qt
692 [qt]: https://qt.io
693 [qt-download-5.15.3]: https://download.qt.io/archive/qt/5.15/5.15.3/
694 [tbb]: https://github.com/intel/tbb/releases
695 [visual-studio]: https://visualstudio.microsoft.com/vs/older-downloads
696 [spack]: https://spack.io/
697 [spack-docs]: https://spack.readthedocs.io/en/latest/