Build Settings#

VTK has a number of settings available for its build. The common variables to modify include:

  • BUILD_SHARED_LIBS (default ON): If set, shared libraries will be built. This is usually what is wanted.

  • VTK_USE_CUDA (default OFF): Whether CUDA support will be available or not.

  • VTK_USE_MPI (default OFF): Whether MPI support will be available or not.

  • VTK_WRAP_PYTHON (default OFF; requires VTK_ENABLE_WRAPPING): Whether Python support will be available or not.

Less common, but variables which may be of interest to some:

  • VTK_BUILD_EXAMPLES (default OFF): If set, VTK’s example code will be added as tests to the VTK test suite.

  • VTK_ENABLE_LOGGING (default ON): If set, enhanced logging will be enabled.

  • VTK_LOGGING_TIME_PRECISION (default 3; requires VTK_ENABLE_LOGGING): Change the precision of times output when VTK_ENABLE_LOGGING is on.

  • VTK_BUILD_TESTING (default OFF): Whether to build tests or not. Valid values are OFF (no testing), WANT (enable tests as possible), and ON (enable all tests; may error out if features otherwise disabled are required by test code).

  • VTK_ENABLE_KITS (default OFF; requires BUILD_SHARED_LIBS): Compile VTK into a smaller set of libraries. Can be useful on platforms where VTK takes a long time to launch due to expensive disk access.

  • VTK_ENABLE_WRAPPING (default ON): Whether any wrapping support will be available or not.

  • VTK_WRAP_JAVA (default OFF; requires VTK_ENABLE_WRAPPING): Whether Java support will be available or not.

  • VTK_WRAP_SERIALIZATION (default OFF; requires VTK_ENABLE_WRAPPING): Whether serialization code will be auto generated or not.

  • VTK_JAVA_INSTALL (default OFF; requires VTK_WRAP_JAVA): Whether to build the Java Maven package for VTK.

  • VTK_SMP_IMPLEMENTATION_TYPE (default Sequential): Set which SMPTools will be implemented by default. Must be either Sequential, STDThread, OpenMP or TBB. The backend can be changed at runtime if the desired backend has his option VTK_SMP_ENABLE_<backend_name> set to ON.

  • VTK_ENABLE_CATALYST (default OFF): Enable catalyst-dependent modules including the VTK catalyst implementation. Depends on an external Catalyst.

  • VTK_WEBASSEMBLY_64_BIT (default OFF): This option is applicable only when building with Emscripten toolchain. Adds -sMEMORY64 compiler and linker flags.

  • VTK_WEBASSEMBLY_THREADS (default OFF): This option is applicable only when building with Emscripten toolchain. Adds -pthread compiler and linker flags. When VTK_BUILD_TESTING is ON, this also runs unit tests in web workers, which is the only way for the tests to reliably load data files without having to embed entire datasets inside the test binaries.

  • VTK_TESTING_WASM_ENGINE (default ``): Path to a wasm runtime executable. This is used to run C++ tests in wasm environments.

  • VTK_TESTING_WASM_ENGINE_ARGUMENTS (default ``): Space separated arguments passed to the wasm runtime executable.