VTK  9.1.0
Functions
Module Implementation CMake APIs

Functions

macro _vtk_module_parse_module_args (name_output)
 Parse vtk.module file contents.
 
macro _vtk_module_parse_kit_args (name_output)
 Parse vtk.kit file contents.
 
function _vtk_module_verify_enable_value (var)
 Verify enable values.
 
function _vtk_module_target_function (prefix)
 Generate arguments for target function wrappers.
 
function _vtk_private_kit_link_target (module)
 Manage the private link target for a module.
 
function _vtk_module_standard_includes ()
 Add "standard" include directories to a module.
 
function _vtk_module_default_export_macro_prefix (varname)
 Determine the default export macro for a module.
 
function _vtk_module_write_wrap_hierarchy ()
 Generate the hierarchy for a module.
 
function _vtk_module_add_header_tests ()
 Add header tests for a module.
 
function _vtk_module_mark_third_party (target)
 Mark a module as being third party.
 
function _vtk_module_graphviz_module_node (var, module)
 Output a node in the graph.
 
macro _vtk_json_bool (output, name, cond)
 Output a boolean to JSON.
 
macro _vtk_json_string_list (output, name, var)
 Output a string list to JSON.
 
function _vtk_module_wrap_java_sources (module, sources, java_sources)
 Generate sources for using a module's classes from Java.
 
function _vtk_module_wrap_java_library (name)
 Generate a JNI library for a set of modules.
 
function _vtk_module_wrap_python_sources (module, sources, classes)
 Generate sources for using a module's classes from Python.
 
function _vtk_module_wrap_python_library (name)
 Generate a CPython library for a set of modules.
 

Detailed Description

Implementation API

No guarantees are made for them and they may change at any time (including wrapping code calls). Note that these functions are usually very lax in their argument parsing.

Function Documentation

◆ _vtk_module_parse_module_args()

macro _vtk_module_parse_module_args ( name_output  )

Parse vtk.module file contents.

This macro places all vtk.module keyword "arguments" into the caller's scope prefixed with the value of name_output which is set to the NAME of the module.

_vtk_module_parse_module_args(name_output <vtk.module args...>)
macro _vtk_module_parse_module_args(name_output)
Parse vtk.module file contents.

For example, this vtk.module file:

NAME
Namespace::Target
LIBRARY_NAME
nsTarget

called with _vtk_module_parse_module_args(name ...) will set the following variables in the calling scope:

  • name: Namespace::Target
  • Namespace::Target_LIBRARY_NAME: nsTarget

With namespace support for module names, the variable should instead be referenced via ${${name}_LIBRARY_NAME} instead.

Definition at line 251 of file vtkModule.cmake.

◆ _vtk_module_parse_kit_args()

macro _vtk_module_parse_kit_args ( name_output  )

Parse vtk.kit file contents.

Just like _vtk_module_parse_module_args, but for kits.

Definition at line 332 of file vtkModule.cmake.

◆ _vtk_module_verify_enable_value()

function _vtk_module_verify_enable_value ( var  )

Verify enable values.

Verifies that the variable named as the first parameter is a valid enable status value.

function _vtk_module_verify_enable_value(var)
Verify enable values.

Definition at line 411 of file vtkModule.cmake.

◆ _vtk_module_target_function()

function _vtk_module_target_function ( prefix  )

Generate arguments for target function wrappers.

Create the INTERFACE, PUBLIC, and PRIVATE arguments for a function wrapping CMake's target_ functions to call the wrapped function.

This is necessary because not all of the functions support empty lists given a keyword.

Definition at line 1411 of file vtkModule.cmake.

◆ _vtk_private_kit_link_target()

function _vtk_private_kit_link_target ( module  )

Manage the private link target for a module.

This function manages the private link target for a module.

[CREATE_IF_NEEDED]
[SETUP_TARGET_NAME <var>]
[USAGE_TARGET_NAME <var>])
function _vtk_private_kit_link_target(module)
Manage the private link target for a module.

Definition at line 1595 of file vtkModule.cmake.

◆ _vtk_module_standard_includes()

function _vtk_module_standard_includes ( )

Add "standard" include directories to a module.

Add the "standard" includes for a module to its interface. These are the source and build directories for the module itself. They are always either PUBLIC or INTERFACE (depending on the module's target type).

[SYSTEM]
[INTERFACE]
TARGET <target>
[HEADERS_DESTINATION <destination>])
function _vtk_module_standard_includes()
Add "standard" include directories to a module.

Definition at line 2845 of file vtkModule.cmake.

◆ _vtk_module_default_export_macro_prefix()

function _vtk_module_default_export_macro_prefix ( varname  )

Determine the default export macro for a module.

Determines the export macro to be used for a module from its metadata. Assumes it is called from within a vtk_module_build call.

_vtk_module_default_library_name(<varname>)

Definition at line 2901 of file vtkModule.cmake.

◆ _vtk_module_write_wrap_hierarchy()

function _vtk_module_write_wrap_hierarchy ( )

Generate the hierarchy for a module.

Write wrap hierarchy files for the module currently being built. This also installs the hierarchy file for use by dependent projects if INSTALL_HEADERS is set.

function _vtk_module_write_wrap_hierarchy()
Generate the hierarchy for a module.

Definition at line 3139 of file vtkModule.cmake.

◆ _vtk_module_add_header_tests()

function _vtk_module_add_header_tests ( )

Add header tests for a module.

Todo:
Move this function out to be VTK-specific, probably into vtkModuleTesting.cmake. Each module would then need to manually call this function. It currently assumes it is in VTK itself.
function _vtk_module_add_header_tests()
Add header tests for a module.

Definition at line 3860 of file vtkModule.cmake.

◆ _vtk_module_mark_third_party()

function _vtk_module_mark_third_party ( target  )

Mark a module as being third party.

Mark a module as being a third party module.

function _vtk_module_mark_third_party(target)
Mark a module as being third party.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)

Definition at line 4892 of file vtkModule.cmake.

◆ _vtk_module_graphviz_module_node()

function _vtk_module_graphviz_module_node ( var  ,
module   
)

Output a node in the graph.

Queries the properties for modules and generates the node for it in the graph and its outgoing dependency edges.

Definition at line 8 of file vtkModuleGraphviz.cmake.

◆ _vtk_json_bool()

macro _vtk_json_bool ( output  ,
name  ,
cond   
)

Output a boolean to JSON.

Appends a condition as a JSON boolean with the given dictionary key name to the given string variable.

_vtk_json_bool(<output> <name> <cond>)
macro _vtk_json_bool(output, name, cond)
Output a boolean to JSON.

Definition at line 12 of file vtkModuleJson.cmake.

◆ _vtk_json_string_list()

macro _vtk_json_string_list ( output  ,
name  ,
var   
)

Output a string list to JSON.

Appends a variable as a JSON list of strings with the given dictionary key name to the given string variable.

_vtk_json_string_list(<output> <name> <cond>)
macro _vtk_json_string_list(output, name, var)
Output a string list to JSON.

Definition at line 33 of file vtkModuleJson.cmake.

◆ _vtk_module_wrap_java_sources()

function _vtk_module_wrap_java_sources ( module  ,
sources  ,
java_sources   
)

Generate sources for using a module's classes from Java.

This function generates the wrapped sources for a module. It places the list of generated source files and Java source files in variables named in the second and third arguments, respectively.

_vtk_module_wrap_java_sources(<module> <sources> <classes>)
function _vtk_module_wrap_java_sources(module, sources, java_sources)
Generate sources for using a module's classes from Java.

Definition at line 26 of file vtkModuleWrapJava.cmake.

◆ _vtk_module_wrap_java_library()

function _vtk_module_wrap_java_library ( name  )

Generate a JNI library for a set of modules.

A single JNI library may consist of the Java wrappings of multiple modules. This is useful for kit-based builds where the modules part of the same kit belong to the same JNI library as well.

_vtk_module_wrap_java_library(<name> <module>...)
function _vtk_module_wrap_java_library(name)
Generate a JNI library for a set of modules.

The first argument is the name of the JNI library. The remaining arguments are modules to include in the JNI library.

The remaining information it uses is assumed to be provided by the vtk_module_wrap_java function.

Definition at line 202 of file vtkModuleWrapJava.cmake.

◆ _vtk_module_wrap_python_sources()

function _vtk_module_wrap_python_sources ( module  ,
sources  ,
classes   
)

Generate sources for using a module's classes from Python.

This function generates the wrapped sources for a module. It places the list of generated source files and classes in variables named in the second and third arguments, respectively.

_vtk_module_wrap_python_sources(<module> <sources> <classes>)
function _vtk_module_wrap_python_sources(module, sources, classes)
Generate sources for using a module's classes from Python.

Definition at line 108 of file vtkModuleWrapPython.cmake.

◆ _vtk_module_wrap_python_library()

function _vtk_module_wrap_python_library ( name  )

Generate a CPython library for a set of modules.

A Python module library may consist of the Python wrappings of multiple modules. This is useful for kit-based builds where the modules part of the same kit belong to the same Python module as well.

function _vtk_module_wrap_python_library(name)
Generate a CPython library for a set of modules.

The first argument is the name of the Python module. The remaining arguments are modules to include in the Python module.

The remaining information it uses is assumed to be provided by the vtk_module_wrap_python function.

Definition at line 250 of file vtkModuleWrapPython.cmake.