CMake - Cross Platform Make (original) (raw)

This is not the latest CMake version. See the main CMake Documentation index for newer versions.
Generated by ctest --help-html.

The "ctest" executable is the CMake test driver program. CMake-generated build trees created for projects that use the ENABLE_TESTING and ADD_TEST commands have testing support. This program will run the tests and report results.

If the current version of CMake is lower than that required it will stop processing the project and report an error. When a version higher than 2.4 is specified the command implicitly invokes
cmake_policy(VERSION major[.minor[.patch[.tweak]]])
which sets the cmake policy version level to the version specified. When version 2.4 or lower is given the command implicitly invokes
cmake_policy(VERSION 2.4)
which enables compatibility features for CMake 2.4 and lower.
The FATAL_ERROR option is accepted but ignored by CMake 2.6 and higher. It should be specified so CMake versions 2.4 and lower fail with an error instead of just a warning.

Copies a file to file and substitutes variable values referenced in the file content. If is a relative path it is evaluated with respect to the current source directory. The must be a file, not a directory. If is a relative path it is evaluated with respect to the current binary directory. If names an existing directory the input file is placed in that directory with its original name.
If the file is modified the build system will re-run CMake to re-configure the file and generate the build system again.
This command replaces any variables in the input file referenced as VARor@VAR@withtheirvaluesasdeterminedbyCMake.Ifavariableisnotdefined,itwillbereplacedwithnothing.IfCOPYONLYisspecified,thennovariableexpansionwilltakeplace.IfESCAPEQUOTESisspecifiedthenanysubstitutedquoteswillbeC−styleescaped.ThefilewillbeconfiguredwiththecurrentvaluesofCMakevariables.If@ONLYisspecified,onlyvariablesoftheform@VAR@willbereplacedand{VAR} or @VAR@ with their values as determined by CMake. If a variable is not defined, it will be replaced with nothing. If COPYONLY is specified, then no variable expansion will take place. If ESCAPE_QUOTES is specified then any substituted quotes will be C-style escaped. The file will be configured with the current values of CMake variables. If @ONLY is specified, only variables of the form @VAR@ will be replaced and VARor@VAR@withtheirvaluesasdeterminedbyCMake.Ifavariableisnotdefined,itwillbereplacedwithnothing.IfCOPYONLYisspecified,thennovariableexpansionwilltakeplace.IfESCAPEQUOTESisspecifiedthenanysubstitutedquoteswillbeC−styleescaped.ThefilewillbeconfiguredwiththecurrentvaluesofCMakevariables.If@ONLYisspecified,onlyvariablesoftheform@VAR@willbereplacedand{VAR} will be ignored. This is useful for configuring scripts that use ${VAR}.
Input file lines of the form "#cmakedefine VAR ..." will be replaced with either "#define VAR ..." or "/* #undef VAR */" depending on whether VAR is set in CMake to any value not considered a false constant by the if() command. (Content of "...", if any, is processed as above.) Input file lines of the form "#cmakedefine01 VAR" will be replaced with either "#define VAR 1" or "#define VAR 0" similarly.
With NEWLINE_STYLE the line ending could be adjusted:
'UNIX' or 'LF' for \n, 'DOS', 'WIN32' or 'CRLF' for \r\n.
COPYONLY must not be used with NEWLINE_STYLE.

Builds the given build directory and stores results in Build.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used.
The TARGET variable can be used to specify a build target. If none is specified, the "all" target will be built.
The RETURN_VALUE option specifies a variable in which to store the return value of the native build tool. The NUMBER_ERRORS and NUMBER_WARNINGS options specify variables in which to store the number of build errors and warnings detected.
The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.

Configures the given build directory and stores results in Configure.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. The OPTIONS argument specifies command line arguments to pass to the configuration tool. The RETURN_VALUE option specifies a variable in which to store the return value of the native build tool.
The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.

Perform the coverage of the given build directory and stores results in Coverage.xml. The second argument is a variable that will hold value.
The LABELS option filters the coverage report to include only source files labeled with at least one of the labels specified.
The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.

Tests the given build directory and stores results in MemCheck.xml. The second argument is a variable that will hold value. Optionally, you can specify the starting test number START, the ending test number END, the number of tests to skip between each test STRIDE, a regular expression for tests to run INCLUDE, or a regular expression for tests not to run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular expressions for tests to be included or excluded by the test property LABEL. PARALLEL_LEVEL should be set to a positive number representing the number of tests to be run in parallel.
The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.

Runs a script or scripts much like if it was run from ctest -S. If no argument is provided then the current script is run using the current settings of the variables. If NEW_PROCESS is specified then each script will be run in a separate process.If RETURN_VALUE is specified the return value of the last script run will be put into var.

Tests the given build directory and stores results in Test.xml. The second argument is a variable that will hold value. Optionally, you can specify the starting test number START, the ending test number END, the number of tests to skip between each test STRIDE, a regular expression for tests to run INCLUDE, or a regular expression for tests to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular expression for test to be included or excluded by the test property LABEL. PARALLEL_LEVEL should be set to a positive number representing the number of tests to be run in parallel. SCHEDULE_RANDOM will launch tests in a random order, and is typically used to detect implicit test dependencies. STOP_TIME is the time of day at which the tests should all stop running.
The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.

The executable is run in the optionally specified directory. The executable can include arguments if it is double quoted, but it is better to use the optional ARGS argument to specify arguments to the program. This is because cmake will then be able to escape spaces in the executable path. An optional argument OUTPUT_VARIABLE specifies a variable in which to store the output. To capture the return value of the execution, provide a RETURN_VALUE. If OUTPUT_VARIABLE is specified, then no output will go to the stdout/stderr of the console running cmake.

Runs the given sequence of one or more commands with the standard output of each process piped to the standard input of the next. A single standard error pipe is used for all processes. If WORKING_DIRECTORY is given the named directory will be set as the current working directory of the child processes. If TIMEOUT is given the child processes will be terminated if they do not finish in the specified number of seconds (fractions are allowed). If RESULT_VARIABLE is given the variable will be set to contain the result of running the processes. This will be an integer return code from the last child or a string describing an error condition. If OUTPUT_VARIABLE or ERROR_VARIABLE are given the variable named will be set with the contents of the standard output and standard error pipes respectively. If the same variable is named for both pipes their output will be merged in the order produced. If INPUT_FILE, OUTPUT_FILE, or ERROR_FILE is given the file named will be attached to the standard input of the first process, standard output of the last process, or standard error of all processes respectively. If OUTPUT_QUIET or ERROR_QUIET is given then the standard output or standard error results will be quietly ignored. If more than one OUTPUT_* or ERROR_* option is given for the same pipe the precedence is not specified. If no OUTPUT_* or ERROR_* options are given the output will be shared with the corresponding pipes of the CMake process itself.
The execute_process command is a newer more powerful version of exec_program, but the old command has been kept for compatibility.

The COPY signature copies files, directories, and symlinks to a destination folder. Relative input paths are evaluated with respect to the current source directory, and a relative destination is evaluated with respect to the current build directory. Copying preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp. Copying preserves input permissions unless explicit permissions or NO_SOURCE_PERMISSIONS are given (default is USE_SOURCE_PERMISSIONS). See the install(DIRECTORY) command for documentation of permissions, PATTERN, REGEX, and EXCLUDE options.
The INSTALL signature differs slightly from COPY: it prints status messages, and NO_SOURCE_PERMISSIONS is default. Installation scripts generated by the install() command use this signature (with some undocumented options for internal use).

This command is used to find a full path to named file. A cache entry named by is created to store the result of this command. If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be -NOTFOUND, and the search will be attempted again the next time find_file is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_PREFIX_PATH
CMAKE_INCLUDE_PATH
CMAKE_FRAMEWORK_PATH
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_PREFIX_PATH
CMAKE_INCLUDE_PATH
CMAKE_FRAMEWORK_PATH
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
INCLUDE
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_INCLUDE_PATH
CMAKE_SYSTEM_FRAMEWORK_PATH
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard
libraries or headers. This is the default on Darwin.
"LAST" - Try to find frameworks after standard
libraries or headers.
"ONLY" - Only try to find frameworks.
"NEVER" - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard
programs. This is the default on Darwin.
"LAST" - Try to find application bundles after standard
programs.
"ONLY" - Only try to find application bundles.
"NEVER" - Never try to find application bundles.
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_file( NAMES name PATHS paths... NO_DEFAULT_PATH)
find_file( NAMES name)
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.

This command is used to find a library. A cache entry named by is created to store the result of this command. If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be -NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable. The name of the library that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
/lib/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/lib for each in CMAKE_PREFIX_PATH
CMAKE_LIBRARY_PATH
CMAKE_FRAMEWORK_PATH
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
/lib/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/lib for each in CMAKE_PREFIX_PATH
CMAKE_LIBRARY_PATH
CMAKE_FRAMEWORK_PATH
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
LIB
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
/lib/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/lib for each in CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_LIBRARY_PATH
CMAKE_SYSTEM_FRAMEWORK_PATH
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard
libraries or headers. This is the default on Darwin.
"LAST" - Try to find frameworks after standard
libraries or headers.
"ONLY" - Only try to find frameworks.
"NEVER" - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard
programs. This is the default on Darwin.
"LAST" - Try to find application bundles after standard
programs.
"ONLY" - Only try to find application bundles.
"NEVER" - Never try to find application bundles.
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_library( NAMES name PATHS paths... NO_DEFAULT_PATH)
find_library( NAMES name)
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
When more than one value is given to the NAMES option this command by default will consider one name at a time and search every directory for it. The NAMES_PER_DIR option tells this command to consider one directory at a time and search for all names in it.
If the library found is a framework, then VAR will be set to the full path to the framework /A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F to link the framework to the target.
If the global property FIND_LIBRARY_USE_LIB64_PATHS is set all search paths will be tested as normal, with "64/" appended, and with all matches of "lib/" replaced with "lib64/". This property is automatically set for the platforms that are known to need it if at least one of the languages supported by the PROJECT command is enabled.

Finds and loads settings from an external project. _FOUND will be set to indicate whether the package was found. When the package is found package-specific information is provided through variables and imported targets documented by the package itself. The QUIET option disables messages if the package cannot be found. The MODULE option disables the second signature documented below. The REQUIRED option stops processing with an error message if the package cannot be found.
A package-specific list of required components may be listed after the COMPONENTS option (or after the REQUIRED option if present). Additional optional components may be listed after OPTIONAL_COMPONENTS. Available components and their influence on whether a package is considered to be found are defined by the target package.
The [version] argument requests a version with which the package found should be compatible (format is major[.minor[.patch[.tweak]]]). The EXACT option requests that the version be matched exactly. If no [version] and/or component list is given to a recursive invocation inside a find-module, the corresponding arguments are forwarded automatically from the outer call (including the EXACT flag for [version]). Version support is currently provided only on a package-by-package basis (details below).
User code should generally look for packages using the above simple signature. The remainder of this command documentation specifies the full command signature and details of the search process. Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
The command has two modes by which it searches for packages: "Module" mode and "Config" mode. Module mode is available when the command is invoked with the above reduced signature. CMake searches for a file called "Find.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation. If the file is found, it is read and processed by CMake. It is responsible for finding the package, checking the version, and producing any needed messages. Many find-modules provide limited or no support for versioning; check the module documentation. If no module is found and the MODULE option is not given the command proceeds to Config mode.
The complete Config mode command signature is:
find_package( [version] [EXACT] [QUIET]
[REQUIRED] [[COMPONENTS] [components...]]
[CONFIG|NO_MODULE]
[NO_POLICY_SCOPE]
[NAMES name1 [name2 ...]]
[CONFIGS config1 [config2 ...]]
[HINTS path1 [path2 ... ]]
[PATHS path1 [path2 ... ]]
[PATH_SUFFIXES suffix1 [suffix2 ...]]
[NO_DEFAULT_PATH]
[NO_CMAKE_ENVIRONMENT_PATH]
[NO_CMAKE_PATH]
[NO_SYSTEM_ENVIRONMENT_PATH]
[NO_CMAKE_PACKAGE_REGISTRY]
[NO_CMAKE_BUILDS_PATH]
[NO_CMAKE_SYSTEM_PATH]
[NO_CMAKE_SYSTEM_PACKAGE_REGISTRY]
[CMAKE_FIND_ROOT_PATH_BOTH |
ONLY_CMAKE_FIND_ROOT_PATH |
NO_CMAKE_FIND_ROOT_PATH])
The CONFIG option may be used to skip Module mode explicitly and switch to Config mode. It is synonymous to using NO_MODULE. Config mode is also implied by use of options not specified in the reduced signature.
Config mode attempts to locate a configuration file provided by the package to be found. A cache entry called _DIR is created to hold the directory containing the file. By default the command searches for a package with the name . If the NAMES option is given the names following it are used instead of . The command searches for a file called "Config.cmake" or "-config.cmake" for each name specified. A replacement set of possible configuration file names may be given using the CONFIGS option. The search procedure is specified below. Once found, the configuration file is read and processed by CMake. Since the file is provided by the package it already knows the location of package contents. The full path to the configuration file is stored in the cmake variable _CONFIG.
All configuration files which have been considered by CMake while searching for an installation of the package with an appropriate version are stored in the cmake variable _CONSIDERED_CONFIGS, the associated versions in _CONSIDERED_VERSIONS.
If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified. If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing. If _DIR has been set to a directory not containing a configuration file CMake will ignore it and search from scratch.
When the [version] argument is given Config mode will only find a version of the package that claims compatibility with the requested version (format is major[.minor[.patch[.tweak]]]). If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package configuration file ".cmake" the corresponding version file is located next to it and named either "-version.cmake" or "Version.cmake". If no such version file is available then the configuration file is assumed to not be compatible with any requested version. A basic version file containing generic version matching code can be created using the macro write_basic_package_version_file(), see its documentation for more details. When a version file is found it is loaded to check the requested version number. The version file is loaded in a nested scope in which the following variables have been defined:
PACKAGE_FIND_NAME = the name
PACKAGE_FIND_VERSION = full requested version string
PACKAGE_FIND_VERSION_MAJOR = major version if requested, else 0
PACKAGE_FIND_VERSION_MINOR = minor version if requested, else 0
PACKAGE_FIND_VERSION_PATCH = patch version if requested, else 0
PACKAGE_FIND_VERSION_TWEAK = tweak version if requested, else 0
PACKAGE_FIND_VERSION_COUNT = number of version components, 0 to 4
The version file checks whether it satisfies the requested version and sets these variables:
PACKAGE_VERSION = full provided version string
PACKAGE_VERSION_EXACT = true if version is exact match
PACKAGE_VERSION_COMPATIBLE = true if version is compatible
PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version
These variables are checked by the find_package command to determine whether the configuration file provides an acceptable version. They are not available after the find_package call returns. If the version is acceptable the following variables are set:
_VERSION = full provided version string
_VERSION_MAJOR = major version if provided, else 0
_VERSION_MINOR = minor version if provided, else 0
_VERSION_PATCH = patch version if provided, else 0
_VERSION_TWEAK = tweak version if provided, else 0
_VERSION_COUNT = number of version components, 0 to 4
and the corresponding package configuration file is loaded. When multiple package configuration files are available whose version files claim compatibility with the version requested it is unspecified which one is chosen. No attempt is made to choose a highest or closest version number.
Config mode provides an elaborate interface and search procedure. Much of the interface is provided for completeness and for use internally by find-modules loaded by Module mode. Most user code should simply call
find_package( [major[.minor]] [EXACT] [REQUIRED|QUIET])
in order to find a package. Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
CMake constructs a set of possible installation prefixes for the package. Under each prefix several directories are searched for a configuration file. The tables below show the directories searched. Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
/ (W)
/(cmake|CMake)/ (W)
// (W)
/
/(cmake|CMake)/ (W)
/(lib/|lib|share)/cmake// (U)
/(lib/|lib|share)/
/ (U)
/(lib/|lib|share)//(cmake|CMake)/ (U)
On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
/.framework/Resources/ (A)
/.framework/Resources/CMake/ (A)
/.framework/Versions/
/Resources/ (A)
/.framework/Versions/*/Resources/CMake/ (A)
/.app/Contents/Resources/ (A)
/.app/Contents/Resources/CMake/ (A)
In all cases the is treated as case-insensitive and corresponds to any of the names specified ( or names given by NAMES). Paths with lib/ are enabled if CMAKE_LIBRARY_ARCHITECTURE is set. If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees. Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory. Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages. This is merely a convention, so all (W) and (U) directories are still searched on all platforms. Directories marked with (A) are intended for installations on Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified all NO_* options are enabled.
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
CMAKE_PREFIX_PATH
CMAKE_FRAMEWORK_PATH
CMAKE_APPBUNDLE_PATH
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
_DIR
CMAKE_PREFIX_PATH
CMAKE_FRAMEWORK_PATH
CMAKE_APPBUNDLE_PATH
3. Search paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
PATH
5. Search project build trees recently configured in a CMake GUI. This can be skipped if NO_CMAKE_BUILDS_PATH is passed. It is intended for the case when a user is building multiple dependent projects one after another.
6. Search paths stored in the CMake user package registry. This can be skipped if NO_CMAKE_PACKAGE_REGISTRY is passed. On Windows a may appear under registry key
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages<package>
as a REG_SZ value, with arbitrary name, that specifies the directory containing the package configuration file. On UNIX platforms a may appear under the directory
~/.cmake/packages/
as a file, with arbitrary name, whose content specifies the directory containing the package configuration file. See the export(PACKAGE) command to create user package registry entries for project build trees.
7. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_FRAMEWORK_PATH
CMAKE_SYSTEM_APPBUNDLE_PATH
8. Search paths stored in the CMake system package registry. This can be skipped if NO_CMAKE_SYSTEM_PACKAGE_REGISTRY is passed. On Windows a may appear under registry key
HKEY_LOCAL_MACHINE\Software\Kitware\CMake\Packages<package>
as a REG_SZ value, with arbitrary name, that specifies the directory containing the package configuration file. There is no system package registry on non-Windows platforms.
9. Search paths specified by the PATHS option. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard
libraries or headers. This is the default on Darwin.
"LAST" - Try to find frameworks after standard
libraries or headers.
"ONLY" - Only try to find frameworks.
"NEVER" - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard
programs. This is the default on Darwin.
"LAST" - Try to find application bundles after standard
programs.
"ONLY" - Only try to find application bundles.
"NEVER" - Never try to find application bundles.
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_package( PATHS paths... NO_DEFAULT_PATH)
find_package()
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
Every non-REQUIRED find_package() call can be disabled by setting the variable CMAKE_DISABLE_FIND_PACKAGE_ to TRUE. See the documentation for the CMAKE_DISABLE_FIND_PACKAGE_ variable for more information.
When loading a find module or package configuration file find_package defines variables to provide information about the call arguments (and restores their original state before returning):
_FIND_REQUIRED = true if REQUIRED option was given
_FIND_QUIETLY = true if QUIET option was given
_FIND_VERSION = full requested version string
_FIND_VERSION_MAJOR = major version if requested, else 0
_FIND_VERSION_MINOR = minor version if requested, else 0
_FIND_VERSION_PATCH = patch version if requested, else 0
_FIND_VERSION_TWEAK = tweak version if requested, else 0
_FIND_VERSION_COUNT = number of version components, 0 to 4
_FIND_VERSION_EXACT = true if EXACT option was given
_FIND_COMPONENTS = list of requested components
FIND_REQUIRED = true if component is required
false if component is optional
In Module mode the loaded find module is responsible to honor the request detailed by these variables; see the find module for details. In Config mode find_package handles REQUIRED, QUIET, and version options automatically but leaves it to the package configuration file to handle components in a way that makes sense for the package. The package configuration file may set _FOUND to false to tell find_package that component requirements are not satisfied.
See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.

This command is used to find a directory containing the named file. A cache entry named by is created to store the result of this command. If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be -NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable. The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_PREFIX_PATH
CMAKE_INCLUDE_PATH
CMAKE_FRAMEWORK_PATH
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_PREFIX_PATH
CMAKE_INCLUDE_PATH
CMAKE_FRAMEWORK_PATH
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
INCLUDE
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
/include/ if CMAKE_LIBRARY_ARCHITECTURE is set, and
/include for each in CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_INCLUDE_PATH
CMAKE_SYSTEM_FRAMEWORK_PATH
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard
libraries or headers. This is the default on Darwin.
"LAST" - Try to find frameworks after standard
libraries or headers.
"ONLY" - Only try to find frameworks.
"NEVER" - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard
programs. This is the default on Darwin.
"LAST" - Try to find application bundles after standard
programs.
"ONLY" - Only try to find application bundles.
"NEVER" - Never try to find application bundles.
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_path( NAMES name PATHS paths... NO_DEFAULT_PATH)
find_path( NAMES name)
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file.

This command is used to find a program. A cache entry named by is created to store the result of this command. If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared. If nothing is found, the result will be -NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable. The name of the program that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.
If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
1. Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.
/[s]bin for each in CMAKE_PREFIX_PATH
CMAKE_PROGRAM_PATH
CMAKE_APPBUNDLE_PATH
2. Search paths specified in cmake-specific environment variables. These are intended to be set in the user's shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
/[s]bin for each in CMAKE_PREFIX_PATH
CMAKE_PROGRAM_PATH
CMAKE_APPBUNDLE_PATH
3. Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.
4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
PATH
5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
/[s]bin for each in CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_PROGRAM_PATH
CMAKE_SYSTEM_APPBUNDLE_PATH
6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.
On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
"FIRST" - Try to find frameworks before standard
libraries or headers. This is the default on Darwin.
"LAST" - Try to find frameworks after standard
libraries or headers.
"ONLY" - Only try to find frameworks.
"NEVER" - Never try to find frameworks.
On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
"FIRST" - Try to find application bundles before standard
programs. This is the default on Darwin.
"LAST" - Try to find application bundles after standard
programs.
"ONLY" - Only try to find application bundles.
"NEVER" - Never try to find application bundles.
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM. This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
The default search order is designed to be most-specific to least-specific for common use cases. Projects may override the order by simply calling the command multiple times and using the NO_* options:
find_program( NAMES name PATHS paths... NO_DEFAULT_PATH)
find_program( NAMES name)
Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.

Iterates over a precise list of items. The LISTS option names list-valued variables to be traversed, including empty elements (an empty string is a zero-length list). The ITEMS option ends argument parsing and includes all arguments following it in the iteration.

Get a variable definition from a directory. This form is useful to get a variable definition from another directory.
See also the more general get_property() command.

The program in FileName will be found in the system search path or left as a full path. If PROGRAM_ARGS is present with PROGRAM, then any command-line arguments present in the FileName string are split from the program name and stored in <ARG_VAR>. This is used to separate a program name from its arguments in a command line string.

Get one property from one object in a scope. The first argument specifies the variable in which to store the result. The second argument determines the scope from which to get the property. It must be one of the following:
GLOBAL scope is unique and does not accept a name.
DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
TARGET scope must name one existing target.
SOURCE scope must name one source file.
TEST scope must name one existing test.
CACHE scope must name one cache entry.
VARIABLE scope is unique and does not accept a name.
The required PROPERTY option is immediately followed by the name of the property to get. If the property is not set an empty value is returned. If the SET option is given the variable is set to a boolean value indicating whether the property has been set. If the DEFINED option is given the variable is set to a boolean value indicating whether the property has been defined such as with define_property. If BRIEF_DOCS or FULL_DOCS is given then the variable is set to a string containing documentation for the requested property. If documentation is requested for a property that has not been defined NOTFOUND is returned.

  1. The left hand argument to MATCHES is first checked to see if it is a defined variable, if so the variable's value is used, otherwise the original value is used.
  2. If the left hand argument to MATCHES is missing it returns false without error
  3. Both left and right hand arguments to LESS GREATER EQUAL are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used.
  4. Both left and right hand arguments to STRLESS STREQUAL STRGREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used.
  5. Both left and right hand argumemnts to VERSION_LESS VERSION_EQUAL VERSION_GREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used.
  6. The right hand argument to NOT is tested to see if it is a boolean constant, if so the value is used, otherwise it is assumed to be a variable and it is dereferenced.
  7. The left and right hand arguments to AND OR are independently tested to see if they are boolean constants, if so they are used as such, otherwise they are assumed to be variables and are dereferenced.

Reads CMake listfile code from the given file. Commands in the file are processed immediately as if they were written in place of the include command. If OPTIONAL is present, then no error is raised if the file does not exist. If RESULT_VARIABLE is given the variable will be set to the full filename which has been included or NOTFOUND if it failed.
If a module is specified instead of a file, the file with name .cmake is searched first in CMAKE_MODULE_PATH, then in the CMake module directory. There is one exception to this: if the file which calls include() is located itself in the CMake module directory, then first the CMake module directory is searched and CMAKE_MODULE_PATH afterwards. See also policy CMP0017.
See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.

The optional keyword determines the type of message:
(none) = Important information
STATUS = Incidental information
WARNING = CMake Warning, continue processing
AUTHOR_WARNING = CMake Warning (dev), continue processing
SEND_ERROR = CMake Error, continue processing,
but skip generation
FATAL_ERROR = CMake Error, stop processing and generation
The CMake command-line tool displays STATUS messages on stdout and all other message types on stderr. The CMake GUI displays all messages in its log area. The interactive dialogs (ccmake and CMakeSetup) show STATUS messages one at a time on a status line and other messages in interactive pop-up boxes.
CMake Warning and Error message text displays using a simple markup language. Non-indented text is formatted in line-wrapped paragraphs delimited by newlines. Indented text is considered pre-formatted.

Provide an option for the user to select as ON or OFF. If no initial value is provided, OFF is used.
If you have options that depend on the values of other options, see the module help for CMakeDependentOption.

Within CMake sets to the value . is expanded before is set to it. Normally, set will set a regular CMake variable. If CACHE is present, then the is put in the cache instead, unless it is already in the cache. See section 'Variable types in CMake' below for details of regular and cache variables and their interactions. If CACHE is used, and are required. is used by the CMake GUI to choose a widget with which the user sets a value. The value for may be one of
FILEPATH = File chooser dialog.
PATH = Directory chooser dialog.
STRING = Arbitrary string.
BOOL = Boolean ON/OFF checkbox.
INTERNAL = No GUI entry (used for persistent variables).
If is INTERNAL, the cache variable is marked as internal, and will not be shown to the user in tools like cmake-gui. This is intended for values that should be persisted in the cache, but which users should not normally change. INTERNAL implies FORCE.
Normally, set(...CACHE...) creates cache variables, but does not modify them. If FORCE is specified, the value of the cache variable is set, even if the variable is already in the cache. This should normally be avoided, as it will remove any changes to the cache variable's value by the user.
If PARENT_SCOPE is present, the variable will be set in the scope above the current scope. Each new directory or function creates a new scope. This command will set the value of a variable into the parent directory or calling function (whichever is applicable to the case at hand). PARENT_SCOPE cannot be combined with CACHE.
If is not specified then the variable is removed instead of set. See also: the unset() command.
set( ... )
In this case is set to a semicolon separated list of values.
can be an environment variable such as:
set( ENV{PATH} /home/martink )
in which case the environment variable will be set.
*** Variable types in CMake ***
In CMake there are two types of variables: normal variables and cache variables. Normal variables are meant for the internal use of the script (just like variables in most programming languages); they are not persisted across CMake runs. Cache variables (unless set with INTERNAL) are mostly intended for configuration settings where the first CMake run determines a suitable default value, which the user can then override, by editing the cache with tools such as ccmake or cmake-gui. Cache variables are stored in the CMake cache file, and are persisted across CMake runs.
Both types can exist at the same time with the same name but different values. When ${FOO} is evaluated, CMake first looks for a normal variable 'FOO' in scope and uses it if set. If and only if no normal variable exists then it falls back to the cache variable 'FOO'.
Some examples:
The code 'set(FOO "x")' sets the normal variable 'FOO'. It does not touch the cache, but it will hide any existing cache value 'FOO'.
The code 'set(FOO "x" CACHE ...)' checks for 'FOO' in the cache, ignoring any normal variable of the same name. If 'FOO' is in the cache then nothing happens to either the normal variable or the cache variable. If 'FOO' is not in the cache, then it is added to the cache.
Finally, whenever a cache variable is added or modified by a command, CMake also *removes* the normal variable of the same name from the current scope so that an immediately following evaluation of it will expose the newly cached value.
Normally projects should avoid using normal and cache variables of the same name, as this interaction can be hard to follow. However, in some situations it can be useful. One example (used by some projects):
A project has a subproject in its source tree. The child project has its own CMakeLists.txt, which is included from the parent CMakeLists.txt using add_subdirectory(). Now, if the parent and the child project provide the same option (for example a compiler option), the parent gets the first chance to add a user-editable option to the cache. Normally, the child would then use the same value that the parent uses. However, it may be necessary to hard-code the value for the child project's option while still allowing the user to edit the value used by the parent project. The parent project can achieve this simply by setting a normal variable with the same name as the option in a scope sufficient to hide the option's cache variable from the child completely. The parent has already set the cache variable, so the child's set(...CACHE...) will do nothing, and evaluating the option variable will use the value from the normal variable, which hides the cache variable.

Set one property on zero or more objects of a scope. The first argument determines the scope in which the property is set. It must be one of the following:
GLOBAL scope is unique and does not accept a name.
DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
TARGET scope may name zero or more existing targets.
SOURCE scope may name zero or more source files. Note that source file properties are visible only to targets added in the same directory (CMakeLists.txt).
TEST scope may name zero or more existing tests.
CACHE scope must name zero or more cache existing entries.
The required PROPERTY option is immediately followed by the name of the property to set. Remaining arguments are used to compose the property value in the form of a semicolon-separated list. If the APPEND option is given the list is appended to any existing property value.If the APPEND_STRING option is given the string is append to any existing property value as string, i.e. it results in a longer string and not a list of strings.

*, + and ? have higher precedence than concatenation. | has lower precedence than concatenation. This means that the regular expression "^ab+d$" matches "abbd" but not "ababd", and the regular expression "^(ab|cd)$" matches "ab" but not "abd".
TIMESTAMP will write a string representation of the current date and/or time to the output variable.
Should the command be unable to obtain a timestamp the output variable will be set to the empty string "".
The optional UTC flag requests the current date/time representation to be in Coordinated Universal Time (UTC) rather than local time.
The optional may contain the following format specifiers:
%d The day of the current month (01-31).
%H The hour on a 24-hour clock (00-23).
%I The hour on a 12-hour clock (01-12).
%j The day of the current year (001-366).
%m The month of the current year (01-12).
%M The minute of the current hour (00-59).
%S The second of the current minute.
60 represents a leap second. (00-60)
%U The week number of the current year (00-53).
%w The day of the current week. 0 is Sunday. (0-6)
%y The last two digits of the current year (00-99)
%Y The current year.
Unknown format specifiers will be ignored and copied to the output as-is.
If no explicit is given it will default to:
%Y-%m-%dT%H:%M:%S for local time.
%Y-%m-%dT%H:%M:%SZ for UTC.

This is the documentation for the properties supported by CMake. Properties can have different scopes. They can either be assigned to a source file, a directory, a target or globally to CMake. By modifying the values of properties the behaviour of the build system can be customized.

This is the documentation for now obsolete listfile commands from previous CMake versions, which are still supported for compatibility reasons. You should instead use the newer, faster and shinier new commands. ;-)

Copyright 2000-2012 Kitware, Inc., Insight Software Consortium. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.