By default, VTK automatically selects the most appropriate render window class at runtime. This selection process uses the Initialize
method of the compiled subclass to test whether the chosen setup is valid. If the initialization succeeds, the corresponding render window instance is returned.
VTK_ABI_NAMESPACE_NAME
(default <DEFAULT>
aka ""
): If set, VTK will
wrap all VTK public symbols in an
inline namespace <VTK_ABI_NAMESPACE_NAME>
to allow runtime co-habitation
with different VTK versions.
Some C ABIs are also wrapped in this namespace using macro expansion
#define c_abi VTK_ABI_NAMESPACE_MANGLE(c_abi)
VTK_ABI_NAMESPACE_ATTRIBUTES
(default <DEFAULT>
aka ""
): If set, VTK will
inject these attributes into the inline namespace
. i.e.
inline namespace <VTK_ABI_NAMESPACE_ATTRIBUTES> <VTK_ABI_NAMESPACE_NAME>
The VTK_ABI_NAMESPACE_ATTRIBUTES
is only applied the the APIs inside of the
namespace, not to C APIs.
VTK_BUILD_DOCUMENTATION
(default OFF
): If set, VTK will build its API
documentation using Doxygen.
VTK_BUILD_SPHINX_DOCUMENTATION
(default OFF
): If set, VTK will build its sphinx
documentation website.
VTK_BUILD_ALL_MODULES
(default OFF
): If set, VTK will enable all
modules not disabled by other features.
VTK_ENABLE_REMOTE_MODULES
(default ON
): If set, VTK will try to build
remote modules (the Remote
directory). If unset, no remote modules will
build.
VTK_ENABLE_EXTRA_BUILD_WARNINGS
(default OFF
; requires CMake >= 3.19):
If set, VTK will enable additional build warnings.
VTK_ENABLE_EXTRA_BUILD_WARNINGS_EVERYTHING
(default OFF
; requires
VTK_ENABLE_EXTRA_BUILD_WARNINGS
and -Weverything
support): If set, VTK
will enable all build warnings (with some explicitly turned off).
VTK_USE_EXTERNAL
(default OFF
): Whether to prefer external third
party libraries or the versions VTK’s source contains.
VTK_TARGET_SPECIFIC_COMPONENTS
(default OFF
): Whether to install
files into target-specific components (<TARGET>-runtime
,
<TARGET>-development
, etc.) or general components (runtime
,
development
, etc.)
VTK_VERSIONED_INSTALL
(default ON
): Whether to add version numbers to
VTK’s include directories and library names in the install tree.
VTK_CUSTOM_LIBRARY_SUFFIX
(default depends on VTK_VERSIONED_INSTALL
):
The custom suffix for libraries built by VTK. Defaults to either an empty
string or X.Y
where X
and Y
are VTK’s major and minor version
components, respectively.
VTK_CUSTOM_LIBRARY_VERSION
(default depends on VTK_VERSIONED_INSTALL
):
The custom version for libraries built by VTK. Defaults to either an empty
string or X.Y
where X
and Y
are VTK’s major and minor version if
VTK_VERSIONED_INSTALL is ON.
VTK_INSTALL_SDK
(default ON
): If set, VTK will install its headers,
CMake API, etc. into its install tree for use.
VTK_FORBID_DOWNLOADS
(default OFF
): If set, VTK will error on any
network activity required during the build (namely remote modules and
testing data).
VTK_DATA_STORE
(default is complicated): If set or detected, points to
where VTK external data will be stored or looked up.
VTK_DATA_EXCLUDE_FROM_ALL
(default is complicated, but
generally OFF
): If set or detected, data downloads will only
happen upon explicit request rather than through the build’s
default target.
VTK_RELOCATABLE_INSTALL
(default ON
): If set, the install tree will be
relocatable to another path. If unset, the install tree may be tied to the
build machine with absolute paths, but finding dependencies in
non-standard locations may require work without passing extra information
when consuming VTK.
VTK_UNIFIED_INSTALL_TREE
(default OFF
): If set, the install tree is
stipulated to be a unified install tree of VTK and all of its dependencies;
a unified tree usually simplifies things including, but not limited to,
the Python module paths, library search paths, and plugin searching. This
option is irrelevant if a relocatable install is requested as such setups
assume that dependencies are set up either via a unified tree or some other
mechanism such as modules).
VTK_ENABLE_SANITIZER
(default OFF
): Whether to enable sanitization of
the VTK codebase or not.
VTK_SANITIZER
(default address
; requires VTK_ENABLE_SANITIZER
): The
sanitizer to use.
VTK_USE_LARGE_DATA
(default OFF
; requires VTK_BUILD_TESTING
):
Whether to enable tests which use “large” data or not (usually used to
reduce the amount of data downloading required for the test suite).
VTK_USE_HIP
(default OFF
; requires CMAKE >= 3.21 and NOT VTK_USE_CUDA
)
Whether HIP support will be available or not.
VTK_LEGACY_REMOVE
(default OFF
): If set, VTK will disable legacy,
deprecated APIs.
VTK_LEGACY_SILENT
(default OFF
; requires VTK_LEGACY_REMOVE
to be
OFF
): If set, usage of legacy, deprecated APIs will not cause warnings.
VTK_USE_FUTURE_CONST
(default OFF
): If set, the VTK_FUTURE_CONST
macro expands to const
; otherwise it expands to nothing. This is used to
incrementally add more const correctness to the codebase while making it
opt-in for backwards compatibility.
VTK_USE_FUTURE_BOOL
(default OFF
): If set, the vtkTypeBool
typedef is defined to bool
; otherwise it’s int
. VTK was created before
C++ even had bool
, and so its oldest code used int
. Set to ON
to opt in
to using more real bool
s, set to OFF
only if required for backwards
compatibility.
VTK_USE_TK
(default OFF
; requires VTK_WRAP_PYTHON
): If set, VTK will
enable Tkinter support for VTK widgets.
VTK_BUILD_COMPILE_TOOLS_ONLY
(default OFF
): If set, VTK will compile
just its compile tools for use in a cross-compile build.
VTK_NO_PYTHON_THREADS
(default OFF
): If set, then all Python threading
in VTK will be disabled.
VTK_PYTHON_FULL_THREADSAFE
(default ON
): If set, lock the Python GIL
for Python C API calls, to make it safe to allow Python thread concurrency.
VTK_SERIAL_TESTS_USE_MPIEXEC
(default OFF
): Used on HPC to run
serial tests on compute nodes. If set, it prefixes serial tests with
“${MPIEXEC_EXECUTABLE}” “${MPIEXEC_NUMPROC_FLAG}” “1” ${MPIEXEC_PREFLAGS}
VTK_WINDOWS_PYTHON_DEBUGGABLE
(default OFF
): Set to ON
if using a
debug build of Python.
VTK_WINDOWS_PYTHON_DEBUGGABLE_REPLACE_SUFFIX
(default OFF
): Set to ON
to use just a _d
suffix for Python modules.
VTK_BUILD_PYI_FILES
(default OFF
): Set to ON
to build .pyi
type
hint files for VTK’s Python interfaces.
VTK_DLL_PATHS
(default ""
or VTK_DLL_PATHS
from the environment): If
set, these paths will be added via Python 3.8’s os.add_dll_directory
mechanism in order to find dependent DLLs when loading VTK’s Python
modules. Note that when using the variable, paths are in CMake form (using
/
) and in the environment are a path list in the platform’s preferred
format.
VTK_ENABLE_VR_COLLABORATION
(default OFF
): If ON
, includes support
for multi client VR collaboration. Requires libzmq and cppzmq external libraries.
VTK_SMP_ENABLE_<backend_name>
(default OFF
if needs an external library otherwise ON
):
If set, builds with the specified SMPTools backend implementation that can be
changed on runtime with VTK_SMP_BACKEND_IN_USE
environment variable.
VTK_USE_VIDEO_FOR_WINDOWS
(default OFF
; requires Windows): Enable the
vtkAVIWriter
class in the VTK::IOMovie
module.
VTK_USE_VIDEO_FOR_WINDOWS_CAPTURE
(default OFF
; requires Windows):
Enable the vtkWin32VideoSource
class in the VTK::IOVideo
module.
VTK_USE_MICROSOFT_MEDIA_FOUNDATION
(default OFF
; requires Windows):
Enable the vtkMP4Writer
class in the VTK::IOMovie
module.
VTK_USE_64BIT_TIMESTAMPS
(default OFF
; forced on for 64-bit builds):
Build with 64-bit vtkMTimeType
.
VTK_USE_64BIT_IDS
(default OFF
for 32-bit builds; ON
for 64-bit
builds): Whether vtkIdType
should be 32-bit or 64-bit.
VTK_DEBUG_LEAKS
(default OFF
): Whether VTK will report leaked
vtkObject
instances at process destruction or not.
VTK_DEBUG_RANGE_ITERATORS
(default OFF
; requires a Debug
build):
Detect errors with for-range
iterators in VTK (note that this is very
slow).
VTK_ALWAYS_OPTIMIZE_ARRAY_ITERATORS
(default OFF
; requires NOT VTK_DEBUG_RANGE_ITERATORS
): Optimize for-range
array iterators even in
Debug
builds.
VTK_ALL_NEW_OBJECT_FACTORY
(default OFF
): If ON
, classes using
vtkStandardNewMacro
will use vtkObjectFactoryNewMacro
allowing
overrides to be available even when not explicitly requested through
vtkObjectFactoryNewMacro
or vtkAbstractObjectFactoryNewMacro
.
VTK_ENABLE_VTKM_OVERRIDES
(default OFF
): If ON
, enables factory override
of certain VTK filters by their VTK-m counterparts. There is also a runtime
switch that can be used to enable/disable the overrides at run-time (on by default).
It can be accessed using the static function vtkmFilterOverrides::SetEnabled(bool)
.
VTK_GENERATE_SPDX
(default OFF
): If ON
, SPDX file will be generated at build time
and installed for each module and third party, in order to be able to create a SBOM.
See SPDX files generation and
SPDX & SBOM for more info.
VTK_ANARI_ENABLE_NVTX
(default OFF
; requires CUDA Toolkit): If ON
, enables the NVIDIA
Tools Extension Library (NVTX) for profiling the ANARI rendering code and visualizing
these events in tools like NSight Systems.
The VTK module system provides a number of variables to control modules which
are not otherwise controlled by the other options provided.
For variables which use the module system’s build settings, the valid values are as follows: