Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
CMake Namespace Reference

Functions

 GIT_IS_REPO (dir, result_var)
 
 GIT_WC_INFO (dir, prefix)
 
 MACRO_PARSE_ARGUMENTS (prefix, arg_names, option_names)
 
 func_build_target (target, build_dir)
 
 func_test (label, build_dir)
 
 finalize_submission ()
 
 check_for_errors ()
 
 run_ctest ()
 
 downloadFile (url, dest)
 
 mitkAddCustomModuleTest (test_name, test_function)
 Add a custom test for MITK module. More...
 
 mitkFunctionAddExternalProject ()
 
 mitkFunctionAddTestLabel (test_name)
 
 mitkFunctionCheckCompilerFlags (CXX_FLAG_TO_TEST, RESULT_VAR)
 
 mitkFunctionCheckCAndCXXCompilerFlags (FLAG_TO_TEST, C_RESULT_VAR, CXX_RESULT_VAR)
 
 mitkFunctionCheckMitkCompatibility ()
 
 mitk_check_module_dependencies ()
 
 mitkFunctionCheckPackageHeader (_header, _provider)
 
 mitkFunctionCMakeDoxygenFilterCompile ()
 Download and compile a CMake doxygen input filter. More...
 
 mitkFunctionCompileSnippets (snippet_path)
 
 mitkFunctionConfigureVisualStudioUserProjectFile ()
 This function will configure a user file for visual studio projects. More...
 
 mitkFunctionConvertXPSchema ()
 
 mitkFunctionCreateBlueBerryApplication ()
 This function will create a BlueBerry application together with all necessary provisioning and configuration data and install support. More...
 
 FunctionCreateBlueBerryApplication ()
 
 mitkFunctionCreateCommandLineApp ()
 This function will create a command line executable and the scripts required to run it. More...
 
 mitkFunctionCreateMatchPointDeployedAlgorithm ()
 This function will create a command line executable and the scripts required to run it. More...
 
 mitk_create_module ()
 
 mitk_create_plugin ()
 Creates a MITK CTK plugin. More...
 
 _FUNCTION_CREATE_CTK_QT_COMPRESSED_HELP (qch_file, use_xsl)
 
 MACRO_CREATE_MITK_CTK_PLUGIN ()
 
 mitkFunctionCreateProvisioningFile ()
 Create a provisioning file. More...
 
 mitkFunctionCreateWindowsBatchScript (in, out, build_type)
 
 mitkFunctionEnableBuildConfiguration ()
 
 mitkFunctionExternalPythonBuildStep (proj, step, _python_executable, _bin_dir)
 
 mitkFunctionGenerateProjectXml (dir, name, targets, is_superbuild)
 
 mitkFunctionGetGccVersion (path_to_gcc, output_var)
 Get the gcc version. More...
 
 mitkFunctionGetLibrarySearchPaths (search_path, intermediate_dir)
 
 mitkFunctionGetMSVCVersion ()
 Get diverse visual studio ids not directly provided by CMake. More...
 
 mitkFunctionGetVersion (source_dir, prefix)
 Extract version information from a local working copy. More...
 
 mitkFunctionGetVersionDescription (source_dir, prefix)
 Extract the version description from a local working copy. More...
 
 mitkFunctionInstallAutoLoadModules ()
 Install auto-load modules needed by plug-ins. More...
 
 BlueBerryApplicationInstallHook ()
 
 mitkFunctionInstallCTKPlugin ()
 Install CTK plug-ins. More...
 
 mitkFunctionInstallExternalCMakeProject (ep_name)
 
 mitkFunctionInstallProvisioningFiles ()
 
 mitkFunctionInstallPython (_python_libs_out, _search_path_out, _app_bundle)
 
 mitkFunctionInstallThirdPartyCTKPlugins ()
 Install external CTK plug-ins. More...
 
 mitkFunctionOrganizeSources ()
 
 _MACRO_APPEND_TO_LIST (_list, _value)
 
 SUPPRESS_VC_DEPRECATED_WARNINGS ()
 
 SUPPRESS_ALL_WARNINGS ()
 
 mitkFunctionTestPlugin ()
 
 MACRO_TEST_UIPLUGIN ()
 
 _mitk_parse_package_args ()
 
 _include_package_config (pkg_config_file)
 
 mitk_use_modules ()
 
 mitkFunctionCreateWhitelistPaths ()
 
 mitkFunctionFindWhitelists ()
 
 mitkFunctionWhitelistModules ()
 
 mitkFunctionWhitelistPlugins ()
 
 _create_type_seq (TYPES, seq_var, seqdim_var)
 
 mitkMacroConfigureItkPixelTypes ()
 
 MITK_CREATE_DEFAULT_TESTS ()
 
 mitk_create_executable ()
 
 MITK_CREATE_MODULE_TESTS ()
 
 mitkMacroEmptyExternalProject (proj, dependencies)
 
 mitkMacroFindDependency (dep)
 
 MITK_GENERATE_TOOLS_LIBRARY ()
 
 GetLinuxDistribution ()
 
 mitkMacroGetPMDPlatformString (varname)
 
 MITK_INSTALL ()
 
 _fixup_target ()
 
 MITK_INSTALL_HELPER_APP ()
 
 MITK_INSTALL_TARGETS ()
 
 MITK_MULTIPLEX_PICTYPE (file)
 
 CONFIGURE_PACKAGE_CONFIG_FILE (_inputFile, _outputFile)
 
 build_and_test ()
 
 create_initial_cache (var, _shared, _threading, _autoload)
 
 usFunctionAddResources ()
 Add resources to a library or executable. More...
 
 usFunctionCheckCompilerFlags (FLAG_TO_TEST, RESULT_VAR)
 
 usFunctionCheckResourceLinking ()
 
 usFunctionCompileSnippets (snippet_path)
 
 _us_create_test_module_helper ()
 
 usFunctionCreateTestModule (name)
 
 usFunctionCreateTestModuleWithResources (name)
 
 usFunctionEmbedResources ()
 Embed resources in a library or executable. More...
 
 usFunctionGenerateModuleInit (src_var)
 Generate a source file which handles proper initialization of a module. More...
 
 usFunctionGetGccVersion (path_to_gcc, output_var)
 Get the gcc version. More...
 
 usFunctionGetResourceSource ()
 Get a source file name for handling resource dependencies. More...
 
 usMacroCreateModule (_project_name)
 

Function Documentation

CMake::_create_type_seq ( TYPES  ,
seq_var  ,
seqdim_var   
)
CMake::_fixup_target ( )
CMake::_FUNCTION_CREATE_CTK_QT_COMPRESSED_HELP ( qch_file  ,
use_xsl   
)
CMake::_include_package_config ( pkg_config_file  )
CMake::_MACRO_APPEND_TO_LIST ( _list  ,
_value   
)
CMake::_mitk_parse_package_args ( )
CMake::_us_create_test_module_helper ( )
CMake::BlueBerryApplicationInstallHook ( )
CMake::build_and_test ( )
CMake::check_for_errors ( )
CMake::CONFIGURE_PACKAGE_CONFIG_FILE ( _inputFile  ,
_outputFile   
)
CMake::create_initial_cache ( var  ,
_shared  ,
_threading  ,
_autoload   
)
CMake::downloadFile ( url  ,
dest   
)
CMake::finalize_submission ( )
CMake::func_build_target ( target  ,
build_dir   
)
CMake::func_test ( label  ,
build_dir   
)
CMake::FunctionCreateBlueBerryApplication ( )
CMake::GetLinuxDistribution ( )
CMake::GIT_IS_REPO ( dir  ,
result_var   
)
CMake::GIT_WC_INFO ( dir  ,
prefix   
)
CMake::MACRO_CREATE_MITK_CTK_PLUGIN ( )
CMake::MACRO_PARSE_ARGUMENTS ( prefix  ,
arg_names  ,
option_names   
)
CMake::MACRO_TEST_UIPLUGIN ( )
CMake::mitk_check_module_dependencies ( )

Checks if all required modules and packages exist and stores missing dependencies in <missing_deps>.

Usage:

mitk_check_module_dependencies( MODULES <module-list> PACKAGES <package-list> MISSING_DEPENDENCIES_VAR <missing_deps> MODULE_DEPENDENCIES_VAR <module_deps> PACKAGE_DEPENDENCIES_VAR <package_deps>)

CMake::MITK_CREATE_DEFAULT_TESTS ( )
CMake::mitk_create_executable ( )

Creates an executable with MITK dependencies and batch files for proper application start-up.

USAGE:

MITK_CREATE_EXECUTABLE( [<exectuableName>]
[DEPENDS <modules we need>]
[PACKAGE_DEPENDS <packages we need, like ITK, VTK, QT>]
[INCLUDE_DIRS <list of additional include directories>]
[TARGET_DEPENDS <list of additional dependencies>
[WARNINGS_AS_ERRORS]
Parameters
EXECUTABLE_NAMEThe name for the new executable target
CMake::mitk_create_module ( )

Creates a module for the automatic module dependency system within MITK.

Example:

DEPENDS PUBLIC MitkCore
PACKAGE_DEPENDS
PRIVATE Qt5|Xml+Networking
PUBLIC ITK|Watershed
WARNINGS_AS_ERRORS

The <moduleName> parameter specifies the name of the module which is used to create a logical target name. The parameter is optional in case the MITK_MODULE_NAME_DEFAULTS_TO_DIRECTORY_NAME variable evaluates to TRUE. The module name will then be derived from the directory name in which this function is called.

If set, the following variables will be used to validate the module name:

MITK_MODULE_NAME_REGEX_MATCH The module name must match this regular expression. MITK_MODULE_NAME_REGEX_NOT_MATCH The module name must not match this regular expression.

If the MITK_MODULE_NAME_PREFIX variable is set, the module name will be prefixed with its contents.

A modules source files are specified in a separate CMake file usually called files.cmake, located in the module root directory. The mitk_create_module() macro evaluates the following CMake variables from the files.cmake file:

  • CPP_FILES A list of .cpp files
  • H_FILES A list of .h files without a corresponding .cpp file
  • TXX_FILES A list of .txx files
  • RESOURCE_FILES A list of files (resources) which are embedded into the module
  • MOC_H_FILES A list of Qt header files which should be processed by the MOC
  • UI_FILES A list of .ui Qt UI files
  • QRC_FILES A list of .qrc Qt resource files
  • DOX_FILES A list of .dox Doxygen files

List of variables available after the function is called:

  • MODULE_NAME
  • MODULE_TARGET
  • MODULE_IS_ENABLED
  • MODULE_SUBPROJECTS
See also
mitk_create_executable

Parameters (all optional):

Parameters
<moduleName>The module name (also used as target name)
FILES_CMAKEFile name of a CMake file setting source list variables (defaults to files.cmake)
VERSIONModule version number, e.g. "1.2.0"
AUTOLOAD_WITHA module target name identifying the module which will trigger the automatic loading of this module
DEPRECATED_SINCEMarks this modules as deprecated since <arg>
DESCRIPTIONA description for this module

Multi-value Parameters (all optional):

Parameters
SUBPROJECTSList of CDash labels
INCLUDE_DIRSInclude directories for this module:
/// [[PUBLIC|PRIVATE|INTERFACE] <dir1>...]...
/// 
The default scope for include directories is PUBLIC.
DEPENDSList of module dependencies:
/// [[PUBLIC|PRIVATE|INTERFACE] <module1>...]...
/// 
The default scope for module dependencies is PUBLIC.
PACKAGE_DEPENDSList of public packages dependencies (e.g. Qt, VTK, etc.). Package dependencies have the following syntax:
/// [PUBLIC|PRIVATE|INTERFACE] PACKAGE[|COMPONENT1[+COMPONENT2]...]
/// 
The default scope for package dependencies is PRIVATE.
ADDITIONAL_LIBSList of additional private libraries linked to this module. The folder containing the library will be added to the global list of library search paths.
CPP_FILESList of source files for this module. If the list is non-empty, the module does not need to provide a files.cmake file or FILES_CMAKE argument.
H_FILESList of public header files for this module. It is recommended to use a files.cmake file instead.

Options (optional)

Parameters
FORCE_STATICForce building this module as a static library
GCC_DEFAULT_VISIBILITYDo not use gcc visibility flags - all symbols will be exported
NO_INITDo not create CppMicroServices initialization code
NO_FEATURE_INFODo not create a feature info by calling add_feature_info()
WARNINGS_AS_ERRORSTreat compiler warnings as errors
CMake::MITK_CREATE_MODULE_TESTS ( )
CMake::mitk_create_plugin ( )

Creates a MITK CTK plugin.

This function should be called from the plugins CMakeLists.txt file. The target name is available after the macro call as ${PLUGIN_TARGET} to add additional libraries in your CMakeLists.txt. Include paths and link libraries are set depending on the value of the Required-Plugins header in your manifest_headers.cmake file.

This function internally calls ctkMacroBuildPlugin() and adds support for Qt Help files and installers.

Options:

Parameters
TEST_PLUGINMark this plug-in as a testing plug-in.
NO_INSTALLDon't install this plug-in.

Parameters:

Parameters
EXPORT_DIRECTIVE(required) The export directive to use in the generated <plugin_target>_Exports.h file.

Multi-value parameters (all optional):

Parameters
EXPORTED_INCLUDE_SUFFIXESA list of sub-directories which should be added to the current source directory. The resulting directories will be available in the set of include directories of depending plug-ins.
MODULE_DEPENDS(optional) A list of Modules this plug-in depends on.
PACKAGE_DEPENDS(optional) A list of external packages this plug-in depends on.
DOXYGEN_TAGFILES(optional) Which external tag files should be available for the plugin documentation
MOC_OPTIONS(optional) Additional options to pass to the Qt MOC compiler
CMake::MITK_GENERATE_TOOLS_LIBRARY ( )
CMake::MITK_INSTALL ( )
CMake::MITK_INSTALL_HELPER_APP ( )

MITK specific cross plattform install macro

Usage: MITK_INSTALL_HELPER_APP(target1 [target2] ....)

CMake::MITK_INSTALL_TARGETS ( )
CMake::MITK_MULTIPLEX_PICTYPE ( file  )
CMake::mitk_use_modules ( )

This CMake function sets up the necessary include directories, linker dependencies, and compile flags for a given target which depends on a set of MITK modules or packages.

A package argument is of the form

[PUBLIC|PRIVATE|INTERFACE] PACKAGE[|COMPONENT1[+COMPONENT2]...]

where PACKAGE is the package name (e.g. VTK) and components are the names of required package components or libraries.

If a dependency is not available, an error is thrown.

CMake::mitkAddCustomModuleTest ( test_name  ,
test_function   
)

Add a custom test for MITK module.

Parameters
test_nameUnique identifier for the test
test_functionName of the test function (the one with the argc,argv signature)

Additional parameters will be passed as command line parameters to the test.

CMake::mitkFunctionAddExternalProject ( )

Register an external project.

Calling this function registers an external project with the MITK build system. Usage:

mitkFunctionAddExternalProject(NAME name [ON|OFF] [PACKAGE package] [COMPONENTS comp1...] [DEPENDS dep1...] [DOC docstring] [NO_CACHE] [ADVANCED] [NO_PACKAGE] )

The function creates a MITK_USE_<name> internal cache variable if the NO_CACHE option is given. If the NO_CACHE option is not set, a normal boolean cache option is created with the given DOC argument as help string. The option is marked as advanced if the ADVANCED option is set. The option's initial value matches the ON or OFF option and defaults to OFF if none is given. The DEPENDS arguments are used to force the corresponding MITK_USE_<depN> cache variables to ON if MITK_USE_<name> is ON.

The PACKAGE argument names the argument for the corresponding find_package() call in MITKs top-level CMakeLists.txt and MITKConfig.cmake file. It defaults to <name>. If COMPONENTS are specified, these are passed to the find_package() call. If the NO_PACKAGE option is given, the find_package() call is suppressed.

For each registered external project there must exist a file called CMakeExternals/<name>.cmake which defines the build process for the external project.

Note
Note that multiple calls of this function must be ordered relative to their declared dependencies. This applies to the DEPENDS arguments of this function as well as the actual target dependencies declared in the CMakeExternals/<name>.cmake file.
CMake::mitkFunctionAddTestLabel ( test_name  )
CMake::mitkFunctionCheckCAndCXXCompilerFlags ( FLAG_TO_TEST  ,
C_RESULT_VAR  ,
CXX_RESULT_VAR   
)
CMake::mitkFunctionCheckCompilerFlags ( CXX_FLAG_TO_TEST  ,
RESULT_VAR   
)
CMake::mitkFunctionCheckMitkCompatibility ( )
CMake::mitkFunctionCheckPackageHeader ( _header  ,
_provider   
)
CMake::mitkFunctionCMakeDoxygenFilterCompile ( )

Download and compile a CMake doxygen input filter.

Parameters
OUT<out-file> (optional) Supply an absolute filename for the generated executable.
NAMESPACE<namespace> (optional) Supply a C++ namespace in which the generated function declrarations should be wrapped.
Returns
This function sets the CMakeDoxygenFilter_EXECUTABLE variable to the absolute path of the generated input filter executable in the parent scope. If <out-file> is specified, they will be the same.

This CMake function compiles the http://github.com/saschazelzer/CMakeDoxygenFilter project into a doxygen input filter executable. See http://github.com/saschazelzer/CMakeDoxygenFilter/blob/master/README for more details.

CMake::mitkFunctionCompileSnippets ( snippet_path  )
CMake::mitkFunctionConfigureVisualStudioUserProjectFile ( )

This function will configure a user file for visual studio projects.

Configure user file for visual studio projects

Parameters
NAME(required) Name of the executable
CMake::mitkFunctionConvertXPSchema ( )
CMake::mitkFunctionCreateBlueBerryApplication ( )

This function will create a BlueBerry application together with all necessary provisioning and configuration data and install support.

Create a BlueBerry application.

Parameters
NAME(required) The name of the executable.
DESCRIPTION(optional) A human-readable description of your application. The usage depends on the CPack generator (on Windows, this is a descriptive text for the created shortcuts).
SOURCES(optional) A list of source files to compile into your executable. Defaults to <name>.cpp.
PLUGINS(optional) A list of required plug-ins. Defaults to all known plug-ins.
EXCLUDE_PLUGINS(optional) A list of plug-ins which should not be used. Mainly useful if PLUGINS was not used.
LINK_LIBRARIESA list of libraries to be linked with the executable.
LIBRARY_DIRSA list of directories to pass through to MITK_INSTALL_TARGETS
SHOW_CONSOLE(option) Show the console output window (on Windows).
NO_PROVISIONING(option) Do not create provisioning files.
NO_INSTALL(option) Do not install this executable

Assuming that there exists a file called MyApp.cpp, an example call looks like:

NAME MyApp
DESCRIPTION "MyApp - New ways to explore medical data"
EXCLUDE_PLUGINS org.mitk.gui.qt.extapplication
SHOW_CONSOLE
)
CMake::mitkFunctionCreateCommandLineApp ( )

This function will create a command line executable and the scripts required to run it.

Create a Command Line App.

Parameters
NAME(required) Name of the command line app
DEPENDS(optional) Required MITK modules beyond MitkCommandLine
PACKAGE_DEPENDS(optional) list of "packages" this command line app depends on (e.g. ITK, VTK, etc.)
CPP_FILES(optional) list of cpp files, if it is not given NAME.cpp is assumed

Assuming that there exists a file called MyApp.cpp, an example call looks like:

NAME MyApp
DEPENDS MitkCore MitkPlanarFigure
PACKAGE_DEPENDS ITK VTK
)
CMake::mitkFunctionCreateMatchPointDeployedAlgorithm ( )

This function will create a command line executable and the scripts required to run it.

Create a Command Line App.

Parameters
NAME(required) Name of the algorithm / cmake target
DEPENDS(optional) Required MITK modules beyond MitkCommandLine
PACKAGE_DEPENDS(optional) list of "packages" this command line app depends on (e.g. ITK, VTK, etc.)
CPP_FILES(optional) list of cpp files, if it is not given NAME.cpp is assumed
INCLUDE_DIRS(optional): All directories that should be added as include dirs to the project
PROFILE(optional): The profile file that should be used for the algorithm. If not set it is "./<algname>.profile".
ADDITIONAL_LIBS(optional) List of additional private libraries linked to this module. The folder containing the library will be added to the global list of library search paths.
H_FILES(optional) List of public header files for this module. Assuming that there exists a file called MyApp.cpp, an example call looks like:
NAME MyApp
DEPENDS MitkCore MitkPlanarFigure
PACKAGE_DEPENDS ITK VTK
)
CMake::mitkFunctionCreateProvisioningFile ( )

Create a provisioning file.

Parameters
FILE<provisioning-file> (required) An absolute filename for the new provisioning file.
INCLUDE<file-list> (optional) A list of additional provisioning files which should be included.
PLUGINS<plugin-list> (optional) A list of target names for which provisioning entries should be created. The entries must be valid targets or be of the form [subdir/]target_name:OFF (this is the same form as passed to the ctkMacroSetupPlugins macro) If the list is empty, all known plug-in targets (external or internal) are considered.
EXCLUDE_PLUGINS<plugin-list> (optional) A list of plug-in symbolic names which should be excluded from the provisioning entries.
NO_INSTALL(option) Suppress the creation of an additional provisioning file suitable for packaging.

This function creates a provisioning file which can be used to provision a BlueBerry application. The syntax of entries in the file is

(READ|INSTALL|START) <file-url>

READ includes the file at <file-url> and interprets it as a provisioning file, INSTALL installs <file-url>, and START installs and starts <file-url> as a plug-in in the framework.

For example the following provisioning file instructs the BlueBerry framework to read the entries in a file called SomeApp.provisioning and subsequently INSTALL and START the plug-in com.mycompany.plugin

READ file:
START file:///opt/mycompany/plugins/libcom_mycompany_plugin.so

An example invocation of this macro may look like:

set(_my_prov_file "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MyApp.provisioning")
set(_my_plugins
com.mycompany.plugin
org.mitk.gui.qt.extapplication
)
FunctionCreateProvisioningFile(FILE ${_my_prov_file} PLUGINS ${_my_plugins})
Note
This function will automatically create entries for all plug-in dependencies of the specified plug-ins.
CMake::mitkFunctionCreateWhitelistPaths ( )

Creates advanced cache variables for setting the internal and external whitelist directories.

USAGE:

The <prefix> parameter specifies the prefix used for the created variables <prefix>_WHITELISTS_INTERNAL_PATH and <prefix>_WHITELISTS_EXTERNAL_PATH.

Default values: <prefix>_WHITELISTS_INTERNAL_PATH = <prefix>_SOURCE_DIR/CMake/Whitelists <prefix>_WHITELISTS_EXTERNAL_PATH = HOME%/.mitk/Whitelists

List of variables available after the function is called:

  • <prefix>_WHITELISTS_INTERNAL_PATH
  • <prefix>_WHITELISTS_EXTERNAL_PATH

Parameters:

Parameters
<prefix>The prefix of the created cache variables.
CMake::mitkFunctionCreateWindowsBatchScript ( in  ,
out  ,
build_type   
)
CMake::mitkFunctionEnableBuildConfiguration ( )
CMake::mitkFunctionExternalPythonBuildStep ( proj  ,
step  ,
_python_executable  ,
_bin_dir   
)

CMake function that runs a python build step from a setup.py script, e.g. python setup.py build. This is used to build external python libraries like numpy. The function takes the necessary build steps, python executable etc. as arguments. The specific build command executed by the runtime is passed as ARGN.

params: proj - The name of the project step - Buildstep used to label the generated outputs, e.g. configure;build;install _python_executable - The python executable _bin_dir - The current binary from where commands are executed relative to it ARGN - Python command that will be run in the _bin_dir/proj-src folder e.g. setup.py build –someflags

CMake::mitkFunctionFindWhitelists ( )

Adds all whitelists found in specfied whitelist paths to the advanced cache variable <prefix>_WHITELIST as enumeration entries.

USAGE:

The <prefix> parameter specifies the prefix used for the created cache variable <prefix>_WHITELIST. Its default value is "None". The function mitkFunctionCreateWhitelistPaths must be called with the same <prefix> prior to this function.

Whitelists are *.cmake files which set the two list variables enabled_modules and enabled_plugins.

List of variables available after the function is called:

  • <prefix>_WHITELIST
See also
mitkFunctionCreateWhitelistPaths

Parameters:

Parameters
<prefix>The prefix of the created cache variable.
CMake::mitkFunctionGenerateProjectXml ( dir  ,
name  ,
targets  ,
is_superbuild   
)
CMake::mitkFunctionGetGccVersion ( path_to_gcc  ,
output_var   
)

Get the gcc version.

CMake::mitkFunctionGetLibrarySearchPaths ( search_path  ,
intermediate_dir   
)
CMake::mitkFunctionGetMSVCVersion ( )

Get diverse visual studio ids not directly provided by CMake.

Sets the following variables in the parent scope VISUAL_STUDIO_VERSION_MAJOR - The Visual Studio Version VISUAL_STUDIO_PRODUCT_NAME - The Visual Studio Product Name

CMake::mitkFunctionGetVersion ( source_dir  ,
prefix   
)

Extract version information from a local working copy.

If the source_dir variable points to a git repository, this function extracts the current revision hash and branch/tag name.

If the source_dir variable points to a subversion repository, this function extracts the current svn revision. The information is provided in

  • ${prefix}_REVISION_ID The git hash or svn revision value
  • ${prefix}_REVISION_NAME The git branch/tag name or empty
  • ${prefix}_WC_TYPE The working copy type, one of "local", "git", or "svn"
Parameters
source_dirThe directory containing a working copy
prefixA prefix to prepend to the variables containing the extracted information.
CMake::mitkFunctionGetVersionDescription ( source_dir  ,
prefix   
)

Extract the version description from a local working copy.

If the given repository is a git repository, the functions runs the git rev-parse –exact-match HEAD command

Information provided is stored in ${prefix}_REVISION_DESC an is

  • The exact tag if the HEAD of the source-tree has a tag
  • the 'git describe' output, which is <latest-reachable-tag>-<#Commits>-g<SHORT-HASH> In case the working copy contains local changes, the ${prefix}_REVISION_DESC strings will contain a suffix [local changes]
Parameters
source_dirThe directory containing a working copy
prefixA prefix to prepent to the variables containing the extracted information
CMake::mitkFunctionInstallAutoLoadModules ( )

Install auto-load modules needed by plug-ins.

Uses the MITK_AUTOLOAD_TARGETS target property of the plug-in targets to extract a list of auto-load target names which will be installed in the given DESTINATION with an appropriate sub-directory appended. If an entry in TARGETS is not a known target, a warning will be issued. This macro can also work on imported plug-in targets.

Note
This macro is usually not called directly. It is indirectly called by a call to FunctionCreateBlueBerryApplication().
Parameters
PLUGINSA list of plug-in targets from which installable audo-load modules are derived.
DESTINATIONThe install destination, e.g. "bin".
CMake::mitkFunctionInstallCTKPlugin ( )

Install CTK plug-ins.

Installs the given list of CTK plug-in targets in the given DESTINATION. If an entry in TARGETS is not a known target, a warning will be issued. This macro can also install imported plug-in targets.

Note
This macro is usually not called directly. It is used in mitk_create_module() and mitkFunctionInstallThirdPartyCTKPlugins().
Parameters
TARGETS(optional) A list of plug-ins (target names) to install.
DESTINATION(optional) The install destination. Defaults to "bin/".
CMake::mitkFunctionInstallExternalCMakeProject ( ep_name  )
CMake::mitkFunctionInstallProvisioningFiles ( )
CMake::mitkFunctionInstallPython ( _python_libs_out  ,
_search_path_out  ,
_app_bundle   
)

This CMake macro installs the python runtime with all python related libraries and toolkits. Py files are searched one by one with a globbing expression to generate a list used by the mac and NSIS installer.

params: _python_libs Returns a list of the installed libraries. Used to fixup the bundle. _app_bundle App bundle name in case of a Apple bundle.

CMake::mitkFunctionInstallThirdPartyCTKPlugins ( )

Install external CTK plug-ins.

Use this macro to call mitkFunctionInstallCTKPlugin() for all known or given external CTK plug-ins. The arguments given until a known argument name are treated as plug-in target names. If none are given, all known external plug-ins will be installed.

This macro supports multiple MacOSX Bundles by checking the variable MACOSX_BUNDLE_NAMES. If it exists, each plug-in will be installed in each given bundle (under <bundle_name>/Contents/MacOS/plugins), otherwise it will be installed in "bin/plugins".

Typical usage (will install all known external plug-ins):

FunctionInstallThirdPartyCTKPlugins()

To install only the org.commontk.eventadmin plug-in for example, call:

FunctionInstallThirdPartyCTKPlugins(org.commontk.eventadmin)
Note
If you provide specific plug-in names as arguments, you must make sure that your list includes the transitive closure of all plug-in dependencies. Use the ctkFunctionGetPluginDependencies() macro to obtain all dependencies of a specified set of plug-ins.
CMake::mitkFunctionOrganizeSources ( )
CMake::mitkFunctionTestPlugin ( )
CMake::mitkFunctionWhitelistModules ( )

Only enables modules which are present in the currently set whitelist or all modules if no whitelist is specified at all.

USAGE:

set(<modules>
ModuleDir
AnotherModuleDir
...
)
mitkFunctionWhitelistModules(<prefix> <modules>)

The <prefix> parameter specifies the prefix used to get the currently set whitelist from <prefix>_WHITELIST. Both functions mitkFunctionCreateWhitelistPaths and mitkFunctionFindWhitelists must be called with the same <prefix> prior to this function. The <modules> list must contain the module directory names instead of the module names itself, as the entries are used in add_directory calls.

See also
mitkFunctionCreateWhitelistPaths
mitkFunctionFindWhitelists

Parameters:

Parameters
<prefix>The prefix of the white list cache variable.
<modules>The module directory list variable.
CMake::mitkFunctionWhitelistPlugins ( )

Only enables plugins which are present in the currently set whitelist or all plugins if no whitelist is specified at all.

USAGE:

set(<plugins>
org.example.plugin:OFF
org.example.another.plugin:ON
...
)
mitkFunctionWhitelistPlugins(<prefix> <plugins>)

The <prefix> parameter specifies the prefix used to get the currently set whitelist from <prefix>_WHITELIST. Both functions mitkFunctionCreateWhitelistPaths and mitkFunctionFindWhitelists must be called with the same <prefix> prior to this function. The <plugins> list must contain the plugin names. This function removes plugins not found in the currently set whitelist from the <plugins> variable. Note that plugins which are OFF by default are not switched on.

See also
mitkFunctionCreateWhitelistPaths
mitkFunctionFindWhitelists

Parameters:

Parameters
<prefix>The prefix of the white list cache variable.
<plugins>The plugin list variable to be modified.
CMake::mitkMacroConfigureItkPixelTypes ( )
CMake::mitkMacroEmptyExternalProject ( proj  ,
dependencies   
)
CMake::mitkMacroFindDependency ( dep  )

Wraps a find_package call by forwarding QUIET and REQUIRED arguments from within the MITKConfig.cmake file.

mitkMacroFindDependency(<dep> [args])

CMake::mitkMacroGetPMDPlatformString ( varname  )
CMake::run_ctest ( )
CMake::SUPPRESS_ALL_WARNINGS ( )
CMake::SUPPRESS_VC_DEPRECATED_WARNINGS ( )
CMake::usFunctionCheckCompilerFlags ( FLAG_TO_TEST  ,
RESULT_VAR   
)
CMake::usFunctionCheckResourceLinking ( )
CMake::usFunctionCompileSnippets ( snippet_path  )
CMake::usFunctionCreateTestModule ( name  )
CMake::usFunctionCreateTestModuleWithResources ( name  )
CMake::usFunctionGetGccVersion ( path_to_gcc  ,
output_var   
)

Get the gcc version.

CMake::usMacroCreateModule ( _project_name  )