<?xml version="1.0" ?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"> ]>
<article>
<articleinfo>
<title>ctest</title>
</articleinfo>
<sect1 id="section_Name">
<title>
Name</title>
<itemizedlist>
</itemizedlist>
<literallayout>  ctest - Testing driver provided by CMake.</literallayout>
    
</sect1>
<sect1 id="section_Usage">
<title>
Usage</title>
<itemizedlist>
</itemizedlist>
<literallayout>  ctest [options]</literallayout>
    
</sect1>
<sect1 id="section_Description">
<title>
Description</title>
<itemizedlist>
</itemizedlist>
<para>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.</para>
</sect1>
<sect1 id="section_Options">
<title>
Options</title>
<itemizedlist>
    <listitem><link linkend="opt_-C &lt;cfg&gt;, --build-config &lt;cfg&gt;"><emphasis><literal>-C &lt;cfg&gt;, --build-config &lt;cfg&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-V,--verbose"><emphasis><literal>-V,--verbose</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-VV,--extra-verbose"><emphasis><literal>-VV,--extra-verbose</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--debug"><emphasis><literal>--debug</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-Q,--quiet"><emphasis><literal>-Q,--quiet</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-O &lt;file&gt;, --output-log &lt;file&gt;"><emphasis><literal>-O &lt;file&gt;, --output-log &lt;file&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-N,--show-only"><emphasis><literal>-N,--show-only</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-R &lt;regex&gt;, --tests-regex &lt;regex&gt;"><emphasis><literal>-R &lt;regex&gt;, --tests-regex &lt;regex&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;"><emphasis><literal>-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;"><emphasis><literal>-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-M &lt;model&gt;, --test-model &lt;model&gt;"><emphasis><literal>-M &lt;model&gt;, --test-model &lt;model&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-T &lt;action&gt;, --test-action &lt;action&gt;"><emphasis><literal>-T &lt;action&gt;, --test-action &lt;action&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--track &lt;track&gt;"><emphasis><literal>--track &lt;track&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-S &lt;script&gt;, --script &lt;script&gt;"><emphasis><literal>-S &lt;script&gt;, --script &lt;script&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-SP &lt;script&gt;, --script-new-process &lt;script&gt;"><emphasis><literal>-SP &lt;script&gt;, --script-new-process &lt;script&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-A &lt;file&gt;, --add-notes &lt;file&gt;"><emphasis><literal>-A &lt;file&gt;, --add-notes &lt;file&gt;</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-I [Start,End,Stride,test#,test#|Test file], --tests-information"><emphasis><literal>-I [Start,End,Stride,test#,test#|Test file], --tests-information</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_-U, --union"><emphasis><literal>-U, --union</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--interactive-debug-mode [0|1]"><emphasis><literal>--interactive-debug-mode [0|1]</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-and-test"><emphasis><literal>--build-and-test</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-target"><emphasis><literal>--build-target</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-nocmake"><emphasis><literal>--build-nocmake</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-run-dir"><emphasis><literal>--build-run-dir</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-two-config"><emphasis><literal>--build-two-config</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-exe-dir"><emphasis><literal>--build-exe-dir</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-generator"><emphasis><literal>--build-generator</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-project"><emphasis><literal>--build-project</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-makeprogram"><emphasis><literal>--build-makeprogram</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-noclean"><emphasis><literal>--build-noclean</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-config-sample"><emphasis><literal>--build-config-sample</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--build-options"><emphasis><literal>--build-options</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--test-command"><emphasis><literal>--test-command</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--test-timeout"><emphasis><literal>--test-timeout</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--tomorrow-tag"><emphasis><literal>--tomorrow-tag</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--ctest-config"><emphasis><literal>--ctest-config</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--overwrite"><emphasis><literal>--overwrite</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--extra-submit &lt;file&gt;[;&lt;file&gt;]"><emphasis><literal>--extra-submit &lt;file&gt;[;&lt;file&gt;]</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--force-new-ctest-process"><emphasis><literal>--force-new-ctest-process</literal></emphasis></link></listitem>
    <listitem><link linkend="opt_--submit-index"><emphasis><literal>--submit-index</literal></emphasis></link></listitem>
</itemizedlist>
    <para id="opt_-C &lt;cfg&gt;, --build-config &lt;cfg&gt;"><sect2><title>-C &lt;cfg&gt;, --build-config &lt;cfg&gt;</title></sect2> Choose configuration to test.</para>

    <para>Some CMake-generated build trees can have multiple build configurations in the same tree.  This option can be used to specify which one should be tested.  Example configurations are "Debug" and "Release".</para>
    <para id="opt_-V,--verbose"><sect2><title>-V,--verbose</title></sect2> Enable verbose output from tests.</para>

    <para>Test output is normally suppressed and only summary information is displayed.  This option will show all test output.</para>
    <para id="opt_-VV,--extra-verbose"><sect2><title>-VV,--extra-verbose</title></sect2> Enable more verbose output from tests.</para>

    <para>Test output is normally suppressed and only summary information is displayed.  This option will show even more test output.</para>
    <para id="opt_--debug"><sect2><title>--debug</title></sect2> Displaying more verbose internals of CTest.</para>

    <para>This feature will result in large number of output that is mostly useful for debugging dashboard problems.</para>
    <para id="opt_-Q,--quiet"><sect2><title>-Q,--quiet</title></sect2> Make ctest quiet.</para>

    <para>This option will suppress all the output. The output log file will still be generated if the --output-log is specified. Options such as --verbose, --extra-verbose, and --debug are ignored if --quiet is specified.</para>
    <para id="opt_-O &lt;file&gt;, --output-log &lt;file&gt;"><sect2><title>-O &lt;file&gt;, --output-log &lt;file&gt;</title></sect2> Output to log file</para>

    <para>This option tells ctest to write all its output to a log file.</para>
    <para id="opt_-N,--show-only"><sect2><title>-N,--show-only</title></sect2> Disable actual execution of tests.</para>

    <para>This option tells ctest to list the tests that would be run but not actually run them.  Useful in conjunction with the -R and -E options.</para>
    <para id="opt_-R &lt;regex&gt;, --tests-regex &lt;regex&gt;"><sect2><title>-R &lt;regex&gt;, --tests-regex &lt;regex&gt;</title></sect2> Run tests matching regular expression.</para>

    <para>This option tells ctest to run only the tests whose names match the given regular expression.</para>
    <para id="opt_-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;"><sect2><title>-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;</title></sect2> Exclude tests matching regular expression.</para>

    <para>This option tells ctest to NOT run the tests whose names match the given regular expression.</para>
    <para id="opt_-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;"><sect2><title>-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;</title></sect2> Execute dashboard test</para>

    <para>This option tells ctest to perform act as a Dart client and perform a dashboard test. All tests are &lt;Mode&gt;&lt;Test&gt;, where Mode can be Experimental, Nightly, and Continuous, and Test can be Start, Update, Configure, Build, Test, Coverage, and Submit.</para>
    <para id="opt_-M &lt;model&gt;, --test-model &lt;model&gt;"><sect2><title>-M &lt;model&gt;, --test-model &lt;model&gt;</title></sect2> Sets the model for a dashboard</para>

    <para>This option tells ctest to act as a Dart client where the TestModel can be Experimental, Nightly, and Continuous. Combining -M and -T is similar to -D</para>
    <para id="opt_-T &lt;action&gt;, --test-action &lt;action&gt;"><sect2><title>-T &lt;action&gt;, --test-action &lt;action&gt;</title></sect2> Sets the dashboard action to perform</para>

    <para>This option tells ctest to act as a Dart client and perform some action such as start, build, test etc. Combining -M and -T is similar to -D</para>
    <para id="opt_--track &lt;track&gt;"><sect2><title>--track &lt;track&gt;</title></sect2> Specify the track to submit dashboard to</para>

    <para>Submit dashboard to specified track instead of default one. By default, the dashboard is submitted to Nightly, Experimental, or Continuous track, but by specifying this option, the track can be arbitrary.</para>
    <para id="opt_-S &lt;script&gt;, --script &lt;script&gt;"><sect2><title>-S &lt;script&gt;, --script &lt;script&gt;</title></sect2> Execute a dashboard for a configuration</para>

    <para>This option tells ctest to load in a configuration script which sets a number of parameters such as the binary and source directories. Then ctest will do what is required to create and run a dashboard. This option basically sets up a dashboard and then runs ctest -D with the appropriate options.</para>
    <para id="opt_-SP &lt;script&gt;, --script-new-process &lt;script&gt;"><sect2><title>-SP &lt;script&gt;, --script-new-process &lt;script&gt;</title></sect2> Execute a dashboard for a configuration</para>

    <para>This option does the same operations as -S but it will do them in a seperate process. This is primarily useful in cases where the script may modify the environment and you do not want the modified enviroment to impact other -S scripts.</para>
    <para id="opt_-A &lt;file&gt;, --add-notes &lt;file&gt;"><sect2><title>-A &lt;file&gt;, --add-notes &lt;file&gt;</title></sect2> Add a notes file with submission</para>

    <para>This option tells ctest to include a notes file when submitting dashboard. </para>
    <para id="opt_-I [Start,End,Stride,test#,test#|Test file], --tests-information"><sect2><title>-I [Start,End,Stride,test#,test#|Test file], --tests-information</title></sect2> Run a specific number of tests by number.</para>

    <para>This option causes ctest to run tests starting at number Start, ending at number End, and incrementing by Stride. Any additional numbers after Stride are considered individual test numbers.  Start, End,or stride can be empty.  Optionally a file can be given that contains the same syntax as the command line.</para>
    <para id="opt_-U, --union"><sect2><title>-U, --union</title></sect2> Take the Union of -I and -R</para>

    <para>When both -R and -I are specified by default the intersection of tests are run. By specifying -U the union of tests is run instead.</para>
    <para id="opt_--interactive-debug-mode [0|1]"><sect2><title>--interactive-debug-mode [0|1]</title></sect2> Set the interactive mode to 0 or 1.</para>

    <para>This option causes ctest to run tests in either an interactive mode or a non-interactive mode. On Windows this means that in non-interactive mode, all system debug pop up windows are blocked. In dashboard mode (Experimental, Nightly, Continuous), the default is non-interactive.  When just running tests not for a dashboard the default is to allow popups and interactive debugging.</para>
    <para id="opt_--build-and-test"><sect2><title>--build-and-test</title></sect2> Configure, build and run a test.</para>

    <para>This option tells ctest to configure (i.e. run cmake on), build, and or execute a test. The configure and test steps are optional. The arguments to this command line are the source and binary directories. By default this will run CMake on the Source/Bin directories specified unless --build-nocmake is specified. Both --build-makeprogram and --build-generator MUST be provided to use --built-and-test. If --test-command is specified then that will be run after the build is complete. Other options that affect this mode are --build-target --build-nocmake, --build-run-dir, --build-two-config, --build-exe-dir, --build-project,--build-noclean, --build-options</para>
    <para id="opt_--build-target"><sect2><title>--build-target</title></sect2> Specify a specific target to build.</para>

    <para>This option goes with the --build-and-test option, if left out the all target is built.</para>
    <para id="opt_--build-nocmake"><sect2><title>--build-nocmake</title></sect2> Run the build without running cmake first.</para>

    <para>Skip the cmake step.</para>
    <para id="opt_--build-run-dir"><sect2><title>--build-run-dir</title></sect2> Specify directory to run programs from.</para>

    <para>Directory where programs will be after it has been compiled.</para>
    <para id="opt_--build-two-config"><sect2><title>--build-two-config</title></sect2> Run CMake twice</para>

    <para id="opt_--build-exe-dir"><sect2><title>--build-exe-dir</title></sect2> Specify the directory for the executable.</para>

    <para id="opt_--build-generator"><sect2><title>--build-generator</title></sect2> Specify the generator to use.</para>

    <para id="opt_--build-project"><sect2><title>--build-project</title></sect2> Specify the name of the project to build.</para>

    <para id="opt_--build-makeprogram"><sect2><title>--build-makeprogram</title></sect2> Specify the make program to use.</para>

    <para id="opt_--build-noclean"><sect2><title>--build-noclean</title></sect2> Skip the make clean step.</para>

    <para id="opt_--build-config-sample"><sect2><title>--build-config-sample</title></sect2> A sample executable to use to determine the configuraiton</para>

    <para>A sample executable to use to determine the configuraiton that should be used. e.g. Debug/Release/etc</para>
    <para id="opt_--build-options"><sect2><title>--build-options</title></sect2> Add extra options to the build step.</para>

    <para>This option must be the last option with the exception of --test-command</para>
    <para id="opt_--test-command"><sect2><title>--test-command</title></sect2> The test to run with the --build-and-test option.</para>

    <para id="opt_--test-timeout"><sect2><title>--test-timeout</title></sect2> The time limit in seconds, internal use only.</para>

    <para id="opt_--tomorrow-tag"><sect2><title>--tomorrow-tag</title></sect2> Nightly or experimental starts with next day tag.</para>

    <para>This is useful if the build will not finish in one day.</para>
    <para id="opt_--ctest-config"><sect2><title>--ctest-config</title></sect2> The configuration file used to initialize CTest state when submitting dashboards.</para>

    <para>This option tells CTest to use different initialization file instead of CTestConfiguration.tcl. This way multiple initialization files can be used for example to submit to multiple dashboards.</para>
    <para id="opt_--overwrite"><sect2><title>--overwrite</title></sect2> Overwrite CTest configuration option.</para>

    <para>By default ctest uses configuration options from configuration file. This option will overwrite the configuration option.</para>
    <para id="opt_--extra-submit &lt;file&gt;[;&lt;file&gt;]"><sect2><title>--extra-submit &lt;file&gt;[;&lt;file&gt;]</title></sect2> Submit extra files to the dashboard.</para>

    <para>This option will submit extra files to the dashboard.</para>
    <para id="opt_--force-new-ctest-process"><sect2><title>--force-new-ctest-process</title></sect2> Run child CTest instances as new processes</para>

    <para>By default CTest will run child CTest instances within the same process. If this behavior is not desired, this argument will enforce new processes for child CTest processes.</para>
    <para id="opt_--submit-index"><sect2><title>--submit-index</title></sect2> Submit individual dashboard tests with specific index</para>

    <para>This option allows performing the same CTest action (such as test) multiple times and submit all stages to the same dashboard (Dart2 required). Each execution requires different index.</para>
</sect1>
<sect1 id="section_Generators">
<title>
Generators</title>
<itemizedlist>
</itemizedlist>
<para>The following generators are available on this platform:</para>
</sect1>
<sect1 id="section_Commands">
<title>
Commands</title>
<itemizedlist>
    <listitem><link linkend="command_break"><emphasis><literal>break</literal></emphasis></link></listitem>
    <listitem><link linkend="command_build_name"><emphasis><literal>build_name</literal></emphasis></link></listitem>
    <listitem><link linkend="command_cmake_minimum_required"><emphasis><literal>cmake_minimum_required</literal></emphasis></link></listitem>
    <listitem><link linkend="command_cmake_policy"><emphasis><literal>cmake_policy</literal></emphasis></link></listitem>
    <listitem><link linkend="command_configure_file"><emphasis><literal>configure_file</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_build"><emphasis><literal>ctest_build</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_configure"><emphasis><literal>ctest_configure</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_coverage"><emphasis><literal>ctest_coverage</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_empty_binary_directory"><emphasis><literal>ctest_empty_binary_directory</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_memcheck"><emphasis><literal>ctest_memcheck</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_read_custom_files"><emphasis><literal>ctest_read_custom_files</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_run_script"><emphasis><literal>ctest_run_script</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_sleep"><emphasis><literal>ctest_sleep</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_start"><emphasis><literal>ctest_start</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_submit"><emphasis><literal>ctest_submit</literal></emphasis></link></listitem>
    <listitem><link linkend="command_CTEST_TEST"><emphasis><literal>CTEST_TEST</literal></emphasis></link></listitem>
    <listitem><link linkend="command_ctest_update"><emphasis><literal>ctest_update</literal></emphasis></link></listitem>
    <listitem><link linkend="command_else"><emphasis><literal>else</literal></emphasis></link></listitem>
    <listitem><link linkend="command_elseif"><emphasis><literal>elseif</literal></emphasis></link></listitem>
    <listitem><link linkend="command_endforeach"><emphasis><literal>endforeach</literal></emphasis></link></listitem>
    <listitem><link linkend="command_endfunction"><emphasis><literal>endfunction</literal></emphasis></link></listitem>
    <listitem><link linkend="command_endif"><emphasis><literal>endif</literal></emphasis></link></listitem>
    <listitem><link linkend="command_endmacro"><emphasis><literal>endmacro</literal></emphasis></link></listitem>
    <listitem><link linkend="command_endwhile"><emphasis><literal>endwhile</literal></emphasis></link></listitem>
    <listitem><link linkend="command_exec_program"><emphasis><literal>exec_program</literal></emphasis></link></listitem>
    <listitem><link linkend="command_execute_process"><emphasis><literal>execute_process</literal></emphasis></link></listitem>
    <listitem><link linkend="command_file"><emphasis><literal>file</literal></emphasis></link></listitem>
    <listitem><link linkend="command_find_file"><emphasis><literal>find_file</literal></emphasis></link></listitem>
    <listitem><link linkend="command_find_library"><emphasis><literal>find_library</literal></emphasis></link></listitem>
    <listitem><link linkend="command_find_package"><emphasis><literal>find_package</literal></emphasis></link></listitem>
    <listitem><link linkend="command_find_path"><emphasis><literal>find_path</literal></emphasis></link></listitem>
    <listitem><link linkend="command_find_program"><emphasis><literal>find_program</literal></emphasis></link></listitem>
    <listitem><link linkend="command_foreach"><emphasis><literal>foreach</literal></emphasis></link></listitem>
    <listitem><link linkend="command_function"><emphasis><literal>function</literal></emphasis></link></listitem>
    <listitem><link linkend="command_get_cmake_property"><emphasis><literal>get_cmake_property</literal></emphasis></link></listitem>
    <listitem><link linkend="command_get_directory_property"><emphasis><literal>get_directory_property</literal></emphasis></link></listitem>
    <listitem><link linkend="command_get_filename_component"><emphasis><literal>get_filename_component</literal></emphasis></link></listitem>
    <listitem><link linkend="command_get_property"><emphasis><literal>get_property</literal></emphasis></link></listitem>
    <listitem><link linkend="command_if"><emphasis><literal>if</literal></emphasis></link></listitem>
    <listitem><link linkend="command_include"><emphasis><literal>include</literal></emphasis></link></listitem>
    <listitem><link linkend="command_list"><emphasis><literal>list</literal></emphasis></link></listitem>
    <listitem><link linkend="command_macro"><emphasis><literal>macro</literal></emphasis></link></listitem>
    <listitem><link linkend="command_make_directory"><emphasis><literal>make_directory</literal></emphasis></link></listitem>
    <listitem><link linkend="command_mark_as_advanced"><emphasis><literal>mark_as_advanced</literal></emphasis></link></listitem>
    <listitem><link linkend="command_math"><emphasis><literal>math</literal></emphasis></link></listitem>
    <listitem><link linkend="command_message"><emphasis><literal>message</literal></emphasis></link></listitem>
    <listitem><link linkend="command_option"><emphasis><literal>option</literal></emphasis></link></listitem>
    <listitem><link linkend="command_remove"><emphasis><literal>remove</literal></emphasis></link></listitem>
    <listitem><link linkend="command_return"><emphasis><literal>return</literal></emphasis></link></listitem>
    <listitem><link linkend="command_separate_arguments"><emphasis><literal>separate_arguments</literal></emphasis></link></listitem>
    <listitem><link linkend="command_set"><emphasis><literal>set</literal></emphasis></link></listitem>
    <listitem><link linkend="command_set_directory_properties"><emphasis><literal>set_directory_properties</literal></emphasis></link></listitem>
    <listitem><link linkend="command_set_property"><emphasis><literal>set_property</literal></emphasis></link></listitem>
    <listitem><link linkend="command_site_name"><emphasis><literal>site_name</literal></emphasis></link></listitem>
    <listitem><link linkend="command_string"><emphasis><literal>string</literal></emphasis></link></listitem>
    <listitem><link linkend="command_variable_watch"><emphasis><literal>variable_watch</literal></emphasis></link></listitem>
    <listitem><link linkend="command_while"><emphasis><literal>while</literal></emphasis></link></listitem>
    <listitem><link linkend="command_write_file"><emphasis><literal>write_file</literal></emphasis></link></listitem>
</itemizedlist>
    <para id="command_break"><sect2><title>break</title></sect2> Break from an enclosing foreach or while loop.</para>

    <literallayout>  break()
</literallayout>
    <para>Breaks from an enclosing foreach loop or while loop</para>
    <para id="command_build_name"><sect2><title>build_name</title></sect2> Deprecated.  Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.</para>

    <literallayout>  build_name(variable)
</literallayout>
    <para>Sets the specified variable to a string representing the platform and compiler settings.  These values are now available through the CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.</para>
    <para id="command_cmake_minimum_required"><sect2><title>cmake_minimum_required</title></sect2> Set the minimum required version of cmake for a project.</para>

    <literallayout>  cmake_minimum_required(VERSION major[.minor[.patch]]
                         [FATAL_ERROR])
</literallayout>
    <para>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
</para><literallayout>  cmake_policy(VERSION major[.minor[.patch]])
</literallayout>
    <para>which sets the cmake policy version level to the version specified.  When version 2.4 or lower is given the command implicitly invokes
</para><literallayout>  cmake_policy(VERSION 2.4)
</literallayout>
    <para>which enables compatibility features for CMake 2.4 and lower.
</para><para>The FATAL_ERROR option is accepted but ignored.  It is left from CMake versions 2.4 and lower in which failure to meet the minimum version was a warning by default.</para>
    <para id="command_cmake_policy"><sect2><title>cmake_policy</title></sect2> Manage CMake Policy settings.</para>

    <para>As CMake evolves it is sometimes necessary to change existing behavior in order to fix bugs or improve implementations of existing features.  The CMake Policy mechanism is designed to help keep existing projects building as new versions of CMake introduce changes in behavior.  Each new policy (behavioral change) is given an identifier of the form "CMP&lt;NNNN&gt;" where "&lt;NNNN&gt;" is an integer index.  Documentation associated with each policy describes the OLD and NEW behavior and the reason the policy was introduced.  Projects may set each policy to select the desired behavior.  When CMake needs to know which behavior to use it checks for a setting specified by the project.  If no setting is available the OLD behavior is assumed and a warning is produced requesting that the policy be set.
</para><para>The cmake_policy command is used to set policies to OLD or NEW behavior.  While setting policies individually is supported, we encourage projects to set policies based on CMake versions.
</para><literallayout>  cmake_policy(VERSION major.minor[.patch])
</literallayout>
    <para>Specify that the current CMake list file is written for the given version of CMake.  All policies introduced in the specified version or earlier will be set to use NEW behavior.  All policies introduced after the specified version will be reset to use OLD behavior with a warning.  This effectively requests behavior preferred as of a given CMake version and tells newer CMake versions to warn about their new policies.  The policy version specified must be at least 2.4 or the command will report an error.  In order to get compatibility features supporting versions earlier than 2.4 see documentation of policy CMP0001.
</para><literallayout>  cmake_policy(SET CMP&lt;NNNN&gt; NEW)
  cmake_policy(SET CMP&lt;NNNN&gt; OLD)
</literallayout>
    <para>Tell CMake to use the OLD or NEW behavior for a given policy.  Projects depending on the old behavior of a given policy may silence a policy warning by setting the policy state to OLD.  Alternatively one may fix the project to work with the new behavior and set the policy state to NEW.
</para><literallayout>  cmake_policy(GET CMP&lt;NNNN&gt; &lt;variable&gt;)
</literallayout>
    <para>Check whether a given policy is set to OLD or NEW behavior.  The output variable value will be "OLD" or "NEW" if the policy is set, and empty otherwise.
</para><literallayout>  cmake_policy(PUSH)
  cmake_policy(POP)
</literallayout>
    <para>Push and pop the current policy setting state on a stack.  Each PUSH must have a matching POP.  This is useful when mixing multiple projects, subprojects, and files included from external projects that may each have been written for a different version of CMake.  Each subdirectory entered by the project automatically pushes a new level on the stack to isolate the subdirectories from their parents.</para>
    <para id="command_configure_file"><sect2><title>configure_file</title></sect2> Copy a file to another location and modify its contents.</para>

    <literallayout>  configure_file(InputFile OutputFile
                 [COPYONLY] [ESCAPE_QUOTES] [@ONLY])
</literallayout>
    <para>The Input and Output files have to have full paths.  This command replaces any variables in the input file referenced as ${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 replaces and ${VAR} will be ignored.  This is useful for configuring scripts that use ${VAR}. Any occurrences of #cmakedefine VAR will be replaced with either #define VAR or /* #undef VAR */ depending on the setting of VAR in CMake</para>
    <para id="command_ctest_build"><sect2><title>ctest_build</title></sect2> Builds the repository.</para>

    <literallayout>  ctest_build([BUILD build_dir] [RETURN_VALUE res])
</literallayout>
    <para>Builds the given build directory and stores results in Build.xml.</para>
    <para id="command_ctest_configure"><sect2><title>ctest_configure</title></sect2> Configures the repository.</para>

    <literallayout>  ctest_configure(BUILD build_dir RETURN_VALUE res)
</literallayout>
    <para>Configures the given build directory and stores results in Configure.xml. The second argument is a variable that will hold return value.</para>
    <para id="command_ctest_coverage"><sect2><title>ctest_coverage</title></sect2> Tests the repository.</para>

    <literallayout>  ctest_coverage([BUILD build_dir] [RETURN_VALUE res])
</literallayout>
    <para>Perform the coverage of the given build directory and stores results in Coverage.xml. The second argument is a variable that will hold value.</para>
    <para id="command_ctest_empty_binary_directory"><sect2><title>ctest_empty_binary_directory</title></sect2> empties the binary directory</para>

    <literallayout>  ctest_empty_binary_directory( directory )
</literallayout>
    <para>Removes a binary directory. This command will perform some checks prior to deleting the directory in an attempt to avoid malicious or accidental directory deletion.</para>
    <para id="command_ctest_memcheck"><sect2><title>ctest_memcheck</title></sect2> Tests the repository.</para>

    <literallayout>  ctest_memcheck([BUILD build_dir] [RETURN_VALUE res])
</literallayout>
    <para>Performs a memory checking of tests in the given build directory and stores results in MemCheck.xml. The second argument is a variable that will hold value.</para>
    <para id="command_ctest_read_custom_files"><sect2><title>ctest_read_custom_files</title></sect2> read CTestCustom files.</para>

    <literallayout>  ctest_read_custom_files( directory ... )
</literallayout>
    <para>Read all the CTestCustom.ctest or CTestCustom.cmake files from the given directory.</para>
    <para id="command_ctest_run_script"><sect2><title>ctest_run_script</title></sect2> runs a ctest -S script</para>

    <literallayout>  ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 
              script_file_name2 ...)
</literallayout>
    <para>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 seperate process.</para>
    <para id="command_ctest_sleep"><sect2><title>ctest_sleep</title></sect2> sleeps for some amount of time</para>

    <literallayout>  ctest_sleep( seconds )
  ctest_sleep( time1 duration time2 )
</literallayout>
    <para>With one argument it will sleep for a given number of seconds. With three arguments it will wait for time2 - time1 - duration seconds.</para>
    <para id="command_ctest_start"><sect2><title>ctest_start</title></sect2> Starts the testing for a given model</para>

    <literallayout>  ctest_start(Model [TRACK &lt;track&gt;] [source [binary]])
</literallayout>
    <para>Starts the testing for a given model. The command should be called after the binary directory is initialized. If the 'source' and 'binary' directory are not specified, it reads the CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is specified, the submissions will go to the specified track.</para>
    <para id="command_ctest_submit"><sect2><title>ctest_submit</title></sect2> Submits the repository.</para>

    <literallayout>  ctest_submit([RETURN_VALUE res])
</literallayout>
    <para>Submits the test results for the project.</para>
    <para id="command_CTEST_TEST"><sect2><title>CTEST_TEST</title></sect2> Tests the repository.</para>

    <literallayout>  CTEST_TEST([BUILD build_dir] [RETURN_VALUE res])
</literallayout>
    <para>Tests the given build directory and stores results in Test.xml. The second argument is a variable that will hold value.</para>
    <para id="command_ctest_update"><sect2><title>ctest_update</title></sect2> Updates the repository.</para>

    <literallayout>  ctest_update([SOURCE source] [RETURN_VALUE res])
</literallayout>
    <para>Updates the given source directory and stores results in Update.xml. The second argument is a variable that will hold the number of files modified. If there is a problem, the variable will be -1.</para>
    <para id="command_else"><sect2><title>else</title></sect2> Starts the else portion of an if block.</para>

    <literallayout>  else(expression)
</literallayout>
    <para>See the if command.</para>
    <para id="command_elseif"><sect2><title>elseif</title></sect2> Starts the elseif portion of an if block.</para>

    <literallayout>  elseif(expression)
</literallayout>
    <para>See the if command.</para>
    <para id="command_endforeach"><sect2><title>endforeach</title></sect2> Ends a list of commands in a FOREACH block.</para>

    <literallayout>  endforeach(expression)
</literallayout>
    <para>See the FOREACH command.</para>
    <para id="command_endfunction"><sect2><title>endfunction</title></sect2> Ends a list of commands in a function block.</para>

    <literallayout>  endfunction(expression)
</literallayout>
    <para>See the function command.</para>
    <para id="command_endif"><sect2><title>endif</title></sect2> Ends a list of commands in an if block.</para>

    <literallayout>  endif(expression)
</literallayout>
    <para>See the if command.</para>
    <para id="command_endmacro"><sect2><title>endmacro</title></sect2> Ends a list of commands in a macro block.</para>

    <literallayout>  endmacro(expression)
</literallayout>
    <para>See the macro command.</para>
    <para id="command_endwhile"><sect2><title>endwhile</title></sect2> Ends a list of commands in a while block.</para>

    <literallayout>  endwhile(expression)
</literallayout>
    <para>See the while command.</para>
    <para id="command_exec_program"><sect2><title>exec_program</title></sect2> Deprecated.  Use the execute_process() command instead.</para>

    <para>Run an executable program during the processing of the CMakeList.txt file.
</para><literallayout>  exec_program(Executable [directory in which to run]
               [ARGS &lt;arguments to executable&gt;]
               [OUTPUT_VARIABLE &lt;var&gt;]
               [RETURN_VALUE &lt;var&gt;])
</literallayout>
    <para>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.
</para>
    <para id="command_execute_process"><sect2><title>execute_process</title></sect2> Execute one or more child processes.</para>

    <literallayout>  execute_process(COMMAND &lt;cmd1&gt; [args1...]]
                  [COMMAND &lt;cmd2&gt; [args2...] [...]]
                  [WORKING_DIRECTORY &lt;directory&gt;]
                  [TIMEOUT &lt;seconds&gt;]
                  [RESULT_VARIABLE &lt;variable&gt;]
                  [OUTPUT_VARIABLE &lt;variable&gt;]
                  [ERROR_VARIABLE &lt;variable&gt;]
                  [INPUT_FILE &lt;file&gt;]
                  [OUTPUT_FILE &lt;file&gt;]
                  [ERROR_FILE &lt;file&gt;]
                  [OUTPUT_QUIET]
                  [ERROR_QUIET]
                  [OUTPUT_STRIP_TRAILING_WHITESPACE]
                  [ERROR_STRIP_TRAILING_WHITESPACE])
</literallayout>
    <para>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.
</para><para>The execute_process command is a newer more powerful version of exec_program, but the old command has been kept for compatibility.</para>
    <para id="command_file"><sect2><title>file</title></sect2> File manipulation command.</para>

    <literallayout>  file(WRITE filename "message to write"... )
  file(APPEND filename "message to write"... )
  file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])
  file(STRINGS filename variable [LIMIT_COUNT num]
       [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]
       [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]
       [NEWLINE_CONSUME] [REGEX regex]
       [NO_HEX_CONVERSION])
  file(GLOB variable [RELATIVE path] [globbing expressions]...)
  file(GLOB_RECURSE variable [RELATIVE path] 
       [FOLLOW_SYMLINKS] [globbing expressions]...)
  file(REMOVE [file1 ...])
  file(REMOVE_RECURSE [file1 ...])
  file(MAKE_DIRECTORY [directory1 directory2 ...])
  file(RELATIVE_PATH variable directory file)
  file(TO_CMAKE_PATH path result)
  file(TO_NATIVE_PATH path result)
  file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log])
</literallayout>
    <para>WRITE will write a message into a file called 'filename'. It overwrites the file if it already exists, and creates the file if it does not exist.
</para><para>APPEND will write a message into a file same as WRITE, except it will append it to the end of the file
</para><para>READ will read the content of a file and store it into the variable. It will start at the given offset and read up to numBytes. If the argument HEX is given, the binary data will be converted to hexadecimal representation and this will be stored in the variable.
</para><para>STRINGS will parse a list of ASCII strings from a file and store it in a variable. Binary data in the file are ignored. Carriage return (CR) characters are ignored. It works also for Intel Hex and Motorola S-record files, which are automatically converted to binary format when reading them. Disable this using NO_HEX_CONVERSION.
</para><para>LIMIT_COUNT sets the maximum number of strings to return. LIMIT_INPUT sets the maximum number of bytes to read from the input file. LIMIT_OUTPUT sets the maximum number of bytes to store in the output variable. LENGTH_MINIMUM sets the minimum length of a string to return. Shorter strings are ignored. LENGTH_MAXIMUM sets the maximum length of a string to return.  Longer strings are split into strings no longer than the maximum length. NEWLINE_CONSUME allows newlines to be included in strings instead of terminating them.
</para><para>REGEX specifies a regular expression that a string must match to be returned. Typical usage 
</para><literallayout>  file(STRINGS myfile.txt myfile)
</literallayout>
    <para>stores a list in the variable "myfile" in which each item is a line from the input file.
</para><para>GLOB will generate a list of all files that match the globbing expressions and store it into the variable. Globbing expressions are similar to regular expressions, but much simpler. If RELATIVE flag is specified for an expression, the results will be returned as a relative path to the given path.
</para><para>Examples of globbing expressions include:
</para><literallayout>   *.cxx      - match all files with extension cxx
   *.vt?      - match all files with extension vta,...,vtz
   f[3-5].txt - match files f3.txt, f4.txt, f5.txt
</literallayout>
    <para>GLOB_RECURSE will generate a list similar to the regular GLOB, except it will traverse all the subdirectories of the matched directory and match the files. Subdirectories that are symlinks are only traversed if FOLLOW_SYMLINKS is given or cmake policy CMP0009 is not set to NEW. See cmake --help-policy CMP0009 for more information.
</para><para>Examples of recursive globbing include:
</para><literallayout>   /dir/*.py  - match all python files in /dir and subdirectories
</literallayout>
    <para>MAKE_DIRECTORY will create the given directories, also if their parent directories don't exist yet
</para><para>REMOVE will remove the given files, also in subdirectories
</para><para>REMOVE_RECURSE will remove the given files and directories, also non-empty directories
</para><para>RELATIVE_PATH will determine relative path from directory to the given file.
</para><para>TO_CMAKE_PATH will convert path into a cmake style path with unix /.  The input can be a single path or a system path like "$ENV{PATH}".  Note the double quotes around the ENV call TO_CMAKE_PATH only takes  one argument.
</para><para>TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from  a cmake style path into the native path style \ for windows and / for UNIX.
</para><para>DOWNLOAD will download the givin URL to the given file. If LOG var is specified a log of the download will be put in var. If STATUS var is specified the status of the operation will be put in var. The status is returned in a list of length 2. The first element is the numeric return value for the operation, and the second element is a string value for the error. A 0 numeric error means no error in the operation. If TIMEOUT time is specified, the operation will timeout after time seconds, time can be specified as a float.
</para>
    <para id="command_find_file"><sect2><title>find_file</title></sect2> Find the full path to a file.</para>

    <literallayout>   find_path(&lt;VAR&gt; name1 [path1 path2 ...])
</literallayout>
    <para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_path(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para><literallayout>   find_path(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</literallayout>
    <para>This command is used to find a full path to named file. A cache entry named by &lt;VAR&gt; 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 &lt;VAR&gt;-NOTFOUND, and the search will be attempted again the next time find_path 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 can be used to give sub directories that will be appended to the search paths.
</para><para>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:
</para><para>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.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para><literallayout>   PATH
   INCLUDE
</literallayout>
    <para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_INCLUDE_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</literallayout>
    <para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para><para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para><literallayout>   "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.
</literallayout>
    <para>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:
</para><literallayout>   "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.
</literallayout>
    <para>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.
</para><para>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:
</para><literallayout>   find_path(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_path(&lt;VAR&gt; NAMES name)
</literallayout>
    <para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.</para>
    <para id="command_find_library"><sect2><title>find_library</title></sect2> Find a library.</para>

    <literallayout>   find_library(&lt;VAR&gt; name1 [path1 path2 ...])
</literallayout>
    <para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_library(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para><literallayout>   find_library(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</literallayout>
    <para>This command is used to find a library. A cache entry named by &lt;VAR&gt; 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 &lt;VAR&gt;-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 can be used to give sub directories that will be appended to the search paths.
</para><para>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:
</para><para>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.
</para><literallayout>   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_LIBRARY_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><literallayout>   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_LIBRARY_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para><literallayout>   PATH
   LIB
</literallayout>
    <para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para><literallayout>   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_LIBRARY_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</literallayout>
    <para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para><para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para><literallayout>   "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.
</literallayout>
    <para>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:
</para><literallayout>   "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.
</literallayout>
    <para>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.
</para><para>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:
</para><literallayout>   find_library(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_library(&lt;VAR&gt; NAMES name)
</literallayout>
    <para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</para><para>If the library found is a framework, then VAR will be set to the full path to the framework &lt;fullPath&gt;/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F&lt;fullPath&gt; to link the framework to the target. </para>
    <para id="command_find_package"><sect2><title>find_package</title></sect2> Load settings for an external project.</para>

    <literallayout>  find_package(&lt;package&gt; [version] [EXACT] [QUIET]
               [[REQUIRED|COMPONENTS] [components...]])
</literallayout>
    <para>Finds and loads settings from an external project.  &lt;package&gt;_FOUND will be set to indicate whether the package was found.  When the package is found package-specific information is provided through variables documented by the package itself.  The QUIET option disables messages if the package cannot be found.  The REQUIRED option stops processing with an error message if the package cannot be found.  A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS option if no REQUIRED option is given.  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.  Version support is currently provided only on a package-by-package basis (details below).
</para><para>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.
</para><para>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&lt;package&gt;.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 the command proceeds to Config mode.
</para><para>The complete Config mode command signature is:
</para><literallayout>  find_package(&lt;package&gt; [version] [EXACT] [QUIET]
               [[REQUIRED|COMPONENTS] [components...]] [NO_MODULE]
               [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_BUILDS_PATH]
               [NO_CMAKE_SYSTEM_PATH]
               [CMAKE_FIND_ROOT_PATH_BOTH |
                ONLY_CMAKE_FIND_ROOT_PATH |
                NO_CMAKE_FIND_ROOT_PATH])
</literallayout>
    <para>The NO_MODULE option may be used to skip Module mode explicitly.  It is also implied by use of options not specified in the reduced signature.  
</para><para>Config mode attempts to locate a configuration file provided by the package to be found.  A cache entry called &lt;package&gt;_DIR is created to hold the directory containing the file.  By default the command searches for a package with the name &lt;package&gt;.  If the NAMES option is given the names following it are used instead of &lt;package&gt;.  The command searches for a file called "&lt;name&gt;Config.cmake" or "&lt;lower-case-name&gt;-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 &lt;package&gt;_CONFIG.
</para><para>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 &lt;package&gt;_DIR has been set to a directory not containing a configuration file a fatal error is always generated because user intervention is required.
</para><para>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 confguration file "&lt;config-file&gt;.cmake" the corresponding version file is located next to it and named either "&lt;config-file&gt;-version.cmake" or "&lt;config-file&gt;Version.cmake".  If no such version file is available then the configuration file is assumed to not be compatible with any requested version.  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:
</para><literallayout>  PACKAGE_FIND_NAME          = the &lt;package&gt; 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
</literallayout>
    <para>The version file checks whether it satisfies the requested version and sets these variables:
</para><literallayout>  PACKAGE_VERSION            = full provided version string
  PACKAGE_VERSION_EXACT      = true if version is exact match
  PACKAGE_VERSION_COMPATIBLE = true if version is compatible
</literallayout>
    <para>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:
</para><literallayout>  &lt;package&gt;_VERSION       = full provided version string
  &lt;package&gt;_VERSION_MAJOR = major version if provided, else 0
  &lt;package&gt;_VERSION_MINOR = minor version if provided, else 0
  &lt;package&gt;_VERSION_PATCH = patch version if provided, else 0
  &lt;package&gt;_VERSION_TWEAK = tweak version if provided, else 0
  &lt;package&gt;_VERSION_COUNT = number of version components, 0 to 4
</literallayout>
    <para>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.
</para><para>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
</para><literallayout>  find_package(&lt;package&gt; [major[.minor]] [EXACT] [REQUIRED|QUIET])
</literallayout>
    <para>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.
</para><para>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.
</para><literallayout>  &lt;prefix&gt;/                                               (W)
  &lt;prefix&gt;/(cmake|CMake)/                                 (W)
  &lt;prefix&gt;/(share|lib)/&lt;name&gt;*/                           (U)
  &lt;prefix&gt;/(share|lib)/&lt;name&gt;*/(cmake|CMake)/             (U)
</literallayout>
    <para>On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
</para><literallayout>  &lt;prefix&gt;/&lt;name&gt;.framework/Resources/                    (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Resources/CMake/              (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/         (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/CMake/   (A)
  &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/                 (A)
  &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/CMake/           (A)
</literallayout>
    <para>In all cases the &lt;name&gt; is treated as case-insensitive and corresponds to any of the names specified (&lt;package&gt; or names given by NAMES).  If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
</para><para>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.
</para><para>The set of installation prefixes is constructed using the following steps.  If NO_DEFAULT_PATH is specified all NO_* options are enabled.
</para><para>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.
</para><literallayout>   CMAKE_PREFIX_PATH
   CMAKE_FRAMEWORK_PATH
   CMAKE_APPBUNDLE_PATH
</literallayout>
    <para>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.
</para><literallayout>   CMAKE_PREFIX_PATH
   CMAKE_FRAMEWORK_PATH
   CMAKE_APPBUNDLE_PATH
</literallayout>
    <para>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.
</para><para>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.
</para><literallayout>   PATH
</literallayout>
    <para>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.
</para><para>6. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para><literallayout>   CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
   CMAKE_SYSTEM_APPBUNDLE_PATH
</literallayout>
    <para>7. Search paths specified by the PATHS option.  These are typically hard-coded guesses.
</para><para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para><literallayout>   "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.
</literallayout>
    <para>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:
</para><literallayout>   "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.
</literallayout>
    <para>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.
</para><para>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:
</para><literallayout>   find_package(&lt;package&gt; PATHS paths... NO_DEFAULT_PATH)
   find_package(&lt;package&gt;)
</literallayout>
    <para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.</para>
    <para id="command_find_path"><sect2><title>find_path</title></sect2> Find the directory containing a file.</para>

    <literallayout>   find_path(&lt;VAR&gt; name1 [path1 path2 ...])
</literallayout>
    <para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_path(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para><literallayout>   find_path(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</literallayout>
    <para>This command is used to find a directory containing the named file. A cache entry named by &lt;VAR&gt; 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 &lt;VAR&gt;-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 can be used to give sub directories that will be appended to the search paths.
</para><para>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:
</para><para>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.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</literallayout>
    <para>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.
</para><para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para><literallayout>   PATH
   INCLUDE
</literallayout>
    <para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para><literallayout>   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_INCLUDE_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</literallayout>
    <para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para><para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para><literallayout>   "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.
</literallayout>
    <para>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:
</para><literallayout>   "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.
</literallayout>
    <para>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.
</para><para>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:
</para><literallayout>   find_path(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_path(&lt;VAR&gt; NAMES name)
</literallayout>
    <para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</para><para>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. </para>
    <para id="command_find_program"><sect2><title>find_program</title></sect2> Find an executable program.</para>

    <literallayout>   find_program(&lt;VAR&gt; name1 [path1 path2 ...])
</literallayout>
    <para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_program(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para><literallayout>   find_program(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</literallayout>
    <para>This command is used to find a program. A cache entry named by &lt;VAR&gt; 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 &lt;VAR&gt;-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 can be used to give sub directories that will be appended to the search paths.
</para><para>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:
</para><para>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.
</para><literallayout>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_PROGRAM_PATH
   CMAKE_APPBUNDLE_PATH
</literallayout>
    <para>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.
</para><literallayout>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_PROGRAM_PATH
   CMAKE_APPBUNDLE_PATH
</literallayout>
    <para>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.
</para><para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para><literallayout>   PATH
   
</literallayout>
    <para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para><literallayout>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_PROGRAM_PATH
   CMAKE_SYSTEM_APPBUNDLE_PATH
</literallayout>
    <para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para><para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para><literallayout>   "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.
</literallayout>
    <para>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:
</para><literallayout>   "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.
</literallayout>
    <para>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.
</para><para>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:
</para><literallayout>   find_program(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_program(&lt;VAR&gt; NAMES name)
</literallayout>
    <para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.</para>
    <para id="command_foreach"><sect2><title>foreach</title></sect2> Evaluate a group of commands for each value in a list.</para>

    <literallayout>  foreach(loop_var arg1 arg2 ...)
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endforeach(loop_var)
  foreach(loop_var RANGE total)
  foreach(loop_var RANGE start stop [step])
</literallayout>
    <para>All commands between foreach and the matching endforeach are recorded without being invoked.  Once the endforeach is evaluated, the recorded list of commands is invoked once for each argument listed in the original foreach command.  Before each iteration of the loop "${loop_var}" will be set as a variable with the current value in the list.
</para><para>Foreach can also iterate over a generated range of numbers. There are three types of this iteration:
</para><para>* When specifying single number, the range will have elements 0 to "total".
</para><para>* When specifying two numbers, the range will have elements from the first number to the second number.
</para><para>* The third optional number is the increment used to iterate from the first number to the second number.</para>
    <para id="command_function"><sect2><title>function</title></sect2> Start recording a function for later invocation as a command.</para>

    <literallayout>  function(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endfunction(&lt;name&gt;)
</literallayout>
    <para>Define a function named &lt;name&gt; that takes arguments named arg1 arg2 arg3 (...).  Commands listed after function, but before the matching endfunction, are not invoked until the function is invoked.  When it is invoked, the commands recorded in the function are first modified by replacing formal parameters (${arg1}) with the arguments passed, and then invoked as normal commands. In addition to referencing the formal parameters you can reference the variable ARGC which will be set to the number of arguments passed into the function as well as ARGV0 ARGV1 ARGV2 ... which will have the actual values of the arguments passed in. This facilitates creating functions with optional arguments. Additionally ARGV holds the list of all arguments given to the function and ARGN holds the list of argument pass the last expected argument.</para>
    <para id="command_get_cmake_property"><sect2><title>get_cmake_property</title></sect2> Get a property of the CMake instance.</para>

    <literallayout>  get_cmake_property(VAR property)
</literallayout>
    <para>Get a property from the CMake instance.  The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and COMPONENTS.</para>
    <para id="command_get_directory_property"><sect2><title>get_directory_property</title></sect2> Get a property of the directory.</para>

    <literallayout>  get_directory_property(VAR [DIRECTORY dir] property)
</literallayout>
    <para>Get a property from the Directory.  The value of the property is stored in the variable VAR. If the property is not found, CMake will report an error. The properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, INCLUDE_DIRECTORIES, LINK_DIRECTORIES, DEFINITIONS, INCLUDE_REGULAR_EXPRESSION, LISTFILE_STACK, PARENT_DIRECTORY, and DEFINITION varname.  If the DIRECTORY argument is provided then the property of the provided directory will be retrieved instead of the current directory. You can only get properties of a directory during or after it has been traversed by cmake.</para>
    <para id="command_get_filename_component"><sect2><title>get_filename_component</title></sect2> Get a specific component of a full filename.</para>

    <literallayout>  get_filename_component(VarName FileName
                         PATH|ABSOLUTE|NAME|EXT|NAME_WE
                         [CACHE])
</literallayout>
    <para>Set VarName to be the path (PATH), file name (NAME), file extension (EXT), file name without extension (NAME_WE) of FileName, or the full absolute (ABSOLUTE) file name without symlinks.  Note that the path is converted to Unix slashes format and has no trailing slashes. The longest file extension is always considered. If the optional CACHE argument is specified, the result variable is added to the cache.
</para><literallayout>  get_filename_component(VarName FileName
                         PROGRAM [PROGRAM_ARGS ArgVar]
                         [CACHE])
</literallayout>
    <para>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 ArgVar.  This is used to separate a program name from its arguments in a command line string.</para>
    <para id="command_get_property"><sect2><title>get_property</title></sect2> Get a property.</para>

    <literallayout>  get_property(&lt;variable&gt;
               &lt;GLOBAL             |
                DIRECTORY [dir]    |
                TARGET    &lt;target&gt; |
                SOURCE    &lt;source&gt; |
                TEST      &lt;test&gt;   |
                VARIABLE&gt;
               PROPERTY &lt;name&gt;
               [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])
</literallayout>
    <para>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:
</para><para>GLOBAL scope is unique and does not accept a name.
</para><para>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
</para><para>TARGET scope must name one existing target.
</para><para>SOURCE scope must name one source file.
</para><para>TEST scope must name one existing test.
</para><para>VARIABLE scope is unique and does not accept a name.
</para><para>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.</para>
    <para id="command_if"><sect2><title>if</title></sect2> Conditionally execute a group of commands.</para>

    <literallayout>  if(expression)
    # then section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  elseif(expression2)
    # elseif section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  else(expression)
    # else section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endif(expression)
</literallayout>
    <para>Evaluates the given expression.  If the result is true, the commands in the THEN section are invoked.  Otherwise, the commands in the else section are invoked.  The elseif and else sections are optional. You may have multiple elseif clauses. Note that the same expression must be given to if, and endif.  Long expressions can be used and the order or precedence is that the EXISTS, COMMAND, and DEFINED operators will be evaluated first. Then any EQUAL, LESS, GREATER, STRLESS, STRGREATER, STREQUAL, MATCHES will be evaluated. Then NOT operators and finally AND, OR operators will be evaluated. Possible expressions are:
</para><literallayout>  if(variable)
</literallayout>
    <para>True if the variable's value is not empty, 0, N, NO, OFF, FALSE, NOTFOUND, or &lt;variable&gt;-NOTFOUND.
</para><literallayout>  if(NOT variable)
</literallayout>
    <para>True if the variable's value is empty, 0, N, NO, OFF, FALSE, NOTFOUND, or &lt;variable&gt;-NOTFOUND.
</para><literallayout>  if(variable1 AND variable2)
</literallayout>
    <para>True if both variables would be considered true individually.
</para><literallayout>  if(variable1 OR variable2)
</literallayout>
    <para>True if either variable would be considered true individually.
</para><literallayout>  if(COMMAND command-name)
</literallayout>
    <para>True if the given name is a command, macro or function that can be invoked.
</para><literallayout>  if(POLICY policy-id)
</literallayout>
    <para>True if the given name is an existing policy (of the form CMP&lt;NNNN&gt;).
</para><literallayout>  if(TARGET target-name)
</literallayout>
    <para>True if the given name is an existing target, built or imported.
</para><literallayout>  if(EXISTS file-name)
  if(EXISTS directory-name)
</literallayout>
    <para>True if the named file or directory exists.  Behavior is well-defined only for full paths.
</para><literallayout>  if(file1 IS_NEWER_THAN file2)
</literallayout>
    <para>True if file1 is newer than file2 or if one of the two files doesn't exist. Behavior is well-defined only for full paths.
</para><literallayout>  if(IS_DIRECTORY directory-name)
</literallayout>
    <para>True if the given name is a directory.  Behavior is well-defined only for full paths.
</para><literallayout>  if(IS_ABSOLUTE path)
</literallayout>
    <para>True if the given path is an absolute path.
</para><literallayout>   if(variable MATCHES regex)
  if(string MATCHES regex)
</literallayout>
    <para>True if the given string or variable's value matches the given regular expression.
</para><literallayout>  if(variable LESS number)
  if(string LESS number)
  if(variable GREATER number)
  if(string GREATER number)
  if(variable EQUAL number)
  if(string EQUAL number)
</literallayout>
    <para>True if the given string or variable's value is a valid number and the inequality or equality is true.
</para><literallayout>  if(variable STRLESS string)
  if(string STRLESS string)
  if(variable STRGREATER string)
  if(string STRGREATER string)
  if(variable STREQUAL string)
  if(string STREQUAL string)
</literallayout>
    <para>True if the given string or variable's value is lexicographically less (or greater, or equal) than the string on the right.
</para><literallayout>  if(version1 VERSION_LESS version2)
  if(version1 VERSION_EQUAL version2)
  if(version1 VERSION_GREATER version2)
</literallayout>
    <para>Component-wise integer version number comparison (version format is major[.minor[.patch[.tweak]]]).
</para><literallayout>  if(DEFINED variable)
</literallayout>
    <para>True if the given variable is defined. It does not matter if the variable is true or false just if it has been set.</para>
    <para id="command_include"><sect2><title>include</title></sect2> Read CMake listfile code from the given file.</para>

    <literallayout>  include(file1 [OPTIONAL] [RESULT_VARIABLE &lt;VAR&gt;])
  include(module [OPTIONAL] [RESULT_VARIABLE &lt;VAR&gt;])
</literallayout>
    <para>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.
</para><para>If a module is specified instead of a file, the file with name &lt;modulename&gt;.cmake is searched in the CMAKE_MODULE_PATH.</para>
    <para id="command_list"><sect2><title>list</title></sect2> List operations.</para>

    <literallayout>  list(LENGTH &lt;list&gt; &lt;output variable&gt;)
  list(GET &lt;list&gt; &lt;element index&gt; [&lt;element index&gt; ...] &lt;output variable&gt;)
  list(APPEND &lt;list&gt; &lt;element&gt; [&lt;element&gt; ...])
  list(FIND &lt;list&gt; &lt;value&gt; &lt;output variable&gt;)
  list(INSERT &lt;list&gt; &lt;element_index&gt; &lt;element&gt; [&lt;element&gt; ...])
  list(REMOVE_ITEM &lt;list&gt; &lt;value&gt; [&lt;value&gt; ...])
  list(REMOVE_AT &lt;list&gt; &lt;index&gt; [&lt;index&gt; ...])
  list(REMOVE_DUPLICATES &lt;list&gt;)
  list(REVERSE &lt;list&gt;)
  list(SORT &lt;list&gt;)
</literallayout>
    <para>LENGTH will return a given list's length.
</para><para>GET will return list of elements specified by indices from the list.
</para><para>APPEND will append elements to the list.
</para><para>FIND will return the index of the element specified in the list or -1 if it wasn't found.
</para><para>INSERT will insert elements to the list to the specified location.
</para><para>REMOVE_AT and REMOVE_ITEM will remove items from the list. The difference is that REMOVE_ITEM will remove the given items, while REMOVE_AT will remove the items at the given indices.
</para><para>REMOVE_DUPLICATES will remove duplicated items in the list.
</para><para>REVERSE reverses the contents of the list in-place.
</para><para>SORT sorts the list in-place alphabetically.
</para><para>NOTES: A list in cmake is a ; separated group of strings. To create a list the set command can be used. For example, set(var a b c d e)  creates a list with a;b;c;d;e, and set(var "a b c d e") creates a string or a list with one item in it.
</para><para>When specifying index values, if &lt;element index&gt; is 0 or greater, it is indexed from the beginning of the list, with 0 representing the first list element. If &lt;element index&gt; is -1 or lesser, it is indexed from the end of the list, with -1 representing the last list element. Be careful when counting with negative indices: they do not start from 0. -0 is equivalent to 0, the first list element.
</para>
    <para id="command_macro"><sect2><title>macro</title></sect2> Start recording a macro for later invocation as a command.</para>

    <literallayout>  macro(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endmacro(&lt;name&gt;)
</literallayout>
    <para>Define a macro named &lt;name&gt; that takes arguments named arg1 arg2 arg3 (...).  Commands listed after macro, but before the matching endmacro, are not invoked until the macro is invoked.  When it is invoked, the commands recorded in the macro are first modified by replacing formal parameters (${arg1}) with the arguments passed, and then invoked as normal commands. In addition to referencing the formal parameters you can reference the values ${ARGC} which will be set to the number of arguments passed into the function as well as ${ARGV0} ${ARGV1} ${ARGV2} ... which will have the actual values of the arguments passed in. This facilitates creating macros with optional arguments. Additionally ${ARGV} holds the list of all arguments given to the macro and ${ARGN} holds the list of argument pass the last expected argument. Note that the parameters to a macro and values such as ARGN are not variables in the usual CMake sense. They are string replacements much like the c preprocessor would do with a macro. If you want true CMake variables you should look at the function command.</para>
    <para id="command_make_directory"><sect2><title>make_directory</title></sect2> Deprecated. Use the file(MAKE_DIRECTORY ) command instead.</para>

    <literallayout>  make_directory(directory)
</literallayout>
    <para>Creates the specified directory.  Full paths should be given.  Any parent directories that do not exist will also be created.  Use with care.</para>
    <para id="command_mark_as_advanced"><sect2><title>mark_as_advanced</title></sect2> Mark cmake cached variables as advanced.</para>

    <literallayout>  mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)
</literallayout>
    <para>Mark the named cached variables as advanced.  An advanced variable will not be displayed in any of the cmake GUIs unless the show advanced option is on.  If CLEAR is the first argument advanced variables are changed back to unadvanced.  If FORCE is the first argument, then the variable is made advanced.  If neither FORCE nor CLEAR is specified, new values will be marked as advanced, but if the variable already has an advanced/non-advanced state, it will not be changed.
</para><para>It does nothing in script mode.</para>
    <para id="command_math"><sect2><title>math</title></sect2> Mathematical expressions.</para>

    <literallayout>  math(EXPR &lt;output variable&gt; &lt;math expression&gt;)
</literallayout>
    <para>EXPR evaluates mathematical expression and return result in the output variable. Example mathematical expression is '5 * ( 10 + 13 )'.  Supported operators are + - * / % | &amp; ^ ~ &lt;&lt; &gt;&gt; * / %.  They have the same meaning  as they do in c code.</para>
    <para id="command_message"><sect2><title>message</title></sect2> Display a message to the user.</para>

    <literallayout>  message([SEND_ERROR | STATUS | FATAL_ERROR]
          "message to display" ...)
</literallayout>
    <para>By default the message is displayed in a pop up window (CMakeSetup), or in the stdout of cmake, or the error section of ccmake. If the first argument is SEND_ERROR then an error is raised, and the generate phase will be skipped.  If the first argument is FATAL_ERROR, all processing is halted. If the first argument is STATUS then the message is displayed in the progress line for the GUI, or with a -- in the command line cmake.</para>
    <para id="command_option"><sect2><title>option</title></sect2> Provides an option that the user can optionally select.</para>

    <literallayout>  option(&lt;option_variable&gt; "help string describing option"
         [initial value])
</literallayout>
    <para>Provide an option for the user to select as ON or OFF.  If no initial value is provided, OFF is used.</para>
    <para id="command_remove"><sect2><title>remove</title></sect2> Deprecated. Use the list(REMOVE_ITEM ) command instead.</para>

    <literallayout>  remove(VAR VALUE VALUE ...)
</literallayout>
    <para>Removes VALUE from the variable VAR.  This is typically used to remove entries from a vector (e.g. semicolon separated list).  VALUE is expanded.</para>
    <para id="command_return"><sect2><title>return</title></sect2> Return from a file, directory or function.</para>

    <literallayout>  return()
</literallayout>
    <para>Returns from a file, directory or function. When this command is encountered in an included file (via include() or find_package()), it causes processing of the current file to stop and control is returned to the including file. If it is encountered in a file which is not included by another file, e.g. a CMakeLists.txt, control is returned to the parent directory if there is one. If return is called in a function, control is returned to the caller of the function. Note that a macro is not a function and does not handle return like a function does.</para>
    <para id="command_separate_arguments"><sect2><title>separate_arguments</title></sect2> Split space separated arguments into a semi-colon separated list.</para>

    <literallayout>  separate_arguments(VARIABLE)
</literallayout>
    <para>Convert the value of VARIABLE to a semi-colon separated list.  All spaces are replaced with ';'.  This helps with generating command lines.</para>
    <para id="command_set"><sect2><title>set</title></sect2> Set a CMAKE variable to a given value.</para>

    <literallayout>  set(&lt;variable&gt; &lt;value&gt; [[CACHE &lt;type&gt; &lt;docstring&gt; [FORCE]] | PARENT_SCOPE])
</literallayout>
    <para>Within CMake sets &lt;variable&gt; to the value &lt;value&gt;.  &lt;value&gt; is expanded  before &lt;variable&gt; is set to it.  If CACHE is present, then the &lt;variable&gt; is put in the cache. &lt;type&gt; and &lt;docstring&gt; are then required. &lt;type&gt; is used by the CMake GUI to choose a widget with which the user sets a value.  The value for &lt;type&gt; may be one of
</para><literallayout>  FILEPATH = File chooser dialog.
  PATH     = Directory chooser dialog.
  STRING   = Arbitrary string.
  BOOL     = Boolean ON/OFF checkbox.
  INTERNAL = No GUI entry (used for persistent variables).
</literallayout>
    <para>If &lt;type&gt; is INTERNAL, then the &lt;value&gt; is always written into the cache, replacing any values existing in the cache.  If it is not a cache variable, then this always writes into the current makefile. The FORCE option will overwrite the cache value removing any changes by the user.
</para><para>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) If VALUE is not specified then the variable is removed from the parent scope.
</para><literallayout>  set(&lt;variable&gt; &lt;value1&gt; ... &lt;valueN&gt;)
</literallayout>
    <para>In this case &lt;variable&gt; is set to a semicolon separated list of values.
</para><para>&lt;variable&gt; can be an environment variable such as:
</para><literallayout>  set( ENV{PATH} /home/martink )
</literallayout>
    <para>in which case the environment variable will be set.</para>
    <para id="command_set_directory_properties"><sect2><title>set_directory_properties</title></sect2> Set a property of the directory.</para>

    <literallayout>  set_directory_properties(PROPERTIES prop1 value1 prop2 value2)
</literallayout>
    <para>Set a property for the current directory and subdirectories. If the property is not found, CMake will report an error. The properties include: INCLUDE_DIRECTORIES, LINK_DIRECTORIES, INCLUDE_REGULAR_EXPRESSION, and ADDITIONAL_MAKE_CLEAN_FILES.
</para><para>ADDITIONAL_MAKE_CLEAN_FILES is a list of files that will be cleaned as a part of "make clean" stage.</para>
    <para id="command_set_property"><sect2><title>set_property</title></sect2> Set a named property in a given scope.</para>

    <literallayout>  set_property(&lt;GLOBAL                            |
                DIRECTORY [dir]                   |
                TARGET    [target1 [target2 ...]] |
                SOURCE    [src1 [src2 ...]]       |
                TEST      [test1 [test2 ...]]&gt;
               [APPEND]
               PROPERTY &lt;name&gt; [value1 [value2 ...]])
</literallayout>
    <para>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:
</para><para>GLOBAL scope is unique and does not accept a name.
</para><para>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
</para><para>TARGET scope may name zero or more existing targets.
</para><para>SOURCE scope may name zero or more source files.
</para><para>TEST scope may name zero or more existing tests.
</para><para>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.</para>
    <para id="command_site_name"><sect2><title>site_name</title></sect2> Set the given variable to the name of the computer.</para>

    <literallayout>  site_name(variable)
</literallayout>
    
    <para id="command_string"><sect2><title>string</title></sect2> String operations.</para>

    <literallayout>  string(REGEX MATCH &lt;regular_expression&gt;
         &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])
  string(REGEX MATCHALL &lt;regular_expression&gt;
         &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])
  string(REGEX REPLACE &lt;regular_expression&gt;
         &lt;replace_expression&gt; &lt;output variable&gt;
         &lt;input&gt; [&lt;input&gt;...])
  string(REPLACE &lt;match_string&gt;
         &lt;replace_string&gt; &lt;output variable&gt;
         &lt;input&gt; [&lt;input&gt;...])
  string(COMPARE EQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE NOTEQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE LESS &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE GREATER &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(ASCII &lt;number&gt; [&lt;number&gt; ...] &lt;output variable&gt;)
  string(CONFIGURE &lt;string1&gt; &lt;output variable&gt;
         [@ONLY] [ESCAPE_QUOTES])
  string(TOUPPER &lt;string1&gt; &lt;output variable&gt;)
  string(TOLOWER &lt;string1&gt; &lt;output variable&gt;)
  string(LENGTH &lt;string&gt; &lt;output variable&gt;)
  string(SUBSTRING &lt;string&gt; &lt;begin&gt; &lt;length&gt; &lt;output variable&gt;)
  string(STRIP &lt;string&gt; &lt;output variable&gt;)
  string(RANDOM [LENGTH &lt;length&gt;] [ALPHABET &lt;alphabet&gt;]
         &lt;output variable&gt;)
</literallayout>
    <para>REGEX MATCH will match the regular expression once and store the match in the output variable.
</para><para>REGEX MATCHALL will match the regular expression as many times as possible and store the matches in the output variable as a list.
</para><para>REGEX REPLACE will match the regular expression as many times as possible and substitute the replacement expression for the match in the output.  The replace expression may refer to paren-delimited subexpressions of the match using \1, \2, ..., \9.  Note that two backslashes (\\1) are required in CMake code to get a backslash through argument parsing.
</para><para>REPLACE will replace all occurrences of match_string in the input with replace_string and store the result in the output.
</para><para>COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and store true or false in the output variable.
</para><para>ASCII will convert all numbers into corresponding ASCII characters.
</para><para>CONFIGURE will transform a string like CONFIGURE_FILE transforms a file.
</para><para>TOUPPER/TOLOWER will convert string to upper/lower characters.
</para><para>LENGTH will return a given string's length.
</para><para>SUBSTRING will return a substring of a given string.
</para><para>STRIP will return a substring of a given string with leading and trailing spaces removed.
</para><para>RANDOM will return a random string of given length consisting of characters from the given alphabet. Default length is 5 characters and default alphabet is all numbers and upper and lower case letters.
</para><para>The following characters have special meaning in regular expressions:
</para><literallayout>   ^         Matches at beginning of a line
   $         Matches at end of a line
   .         Matches any single character
   [ ]       Matches any character(s) inside the brackets
   [^ ]      Matches any character(s) not inside the brackets
    -        Matches any character in range on either side of a dash
   *         Matches preceding pattern zero or more times
   +         Matches preceding pattern one or more times
   ?         Matches preceding pattern zero or once only
   |         Matches a pattern on either side of the |
   ()        Saves a matched subexpression, which can be referenced in the REGEX REPLACE operation. Additionally it is saved in the special CMake variables CMAKE_MATCH_(0..9).</literallayout>
    
    <para id="command_variable_watch"><sect2><title>variable_watch</title></sect2> Watch the CMake variable for change.</para>

    <literallayout>  variable_watch(&lt;variable name&gt; [&lt;command to execute&gt;])
</literallayout>
    <para>If the specified variable changes, the message will be printed about the variable being changed. If the command is specified, the command will be executed. The command will receive the following arguments: COMMAND(&lt;variable&gt; &lt;access&gt; &lt;value&gt; &lt;current list file&gt; &lt;stack&gt;)</para>
    <para id="command_while"><sect2><title>while</title></sect2> Evaluate a group of commands while a condition is true</para>

    <literallayout>  while(condition)
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endwhile(condition)
</literallayout>
    <para>All commands between while and the matching endwhile are recorded without being invoked.  Once the endwhile is evaluated, the recorded list of commands is invoked as long as the condition is true. The condition is evaluated using the same logic as the if command.</para>
    <para id="command_write_file"><sect2><title>write_file</title></sect2> Deprecated. Use the file(WRITE ) command instead.</para>

    <literallayout>  write_file(filename "message to write"... [APPEND])
</literallayout>
    <para>The first argument is the file name, the rest of the arguments are messages to write. If the argument APPEND is specified, then the message will be appended.
</para><para>NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as this one but add some more functionality.
</para><para>NOTE 2: When using write_file the produced file cannot be used as an input to CMake (CONFIGURE_FILE, source file ...) because it will lead to an infinite loop. Use configure_file if you want to generate input files to CMake.</para>
</sect1>
<sect1 id="section_Properties">
<title>
Properties</title>
<itemizedlist>
</itemizedlist>
<literallayout>  CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.</literallayout>
    
<para>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.</para>
</sect1>
<sect1 id="section_Compatibility Commands">
<title>
Compatibility Commands</title>
<itemizedlist>
</itemizedlist>
<literallayout>  CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.</literallayout>
    
<para>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. ;-)</para>
</sect1>
<sect1 id="section_Standard CMake Modules">
<title>
Standard CMake Modules</title>
<itemizedlist>
</itemizedlist>
</sect1>
<sect1 id="section_Copyright">
<title>
Copyright</title>
<itemizedlist>
</itemizedlist>
<para>Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.</para>
<para>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</para>
<para>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</para>
<para>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.</para>
<para>The names of Kitware, Inc., the Insight Consortium, or the names of any consortium members, or of any contributors, may not be used to endorse or promote products derived from this software without specific prior written permission.</para>
<para>Modified source versions must be plainly marked as such, and must not be misrepresented as being the original software.</para>
<para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS 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.</para>
</sect1>
<sect1 id="section_See Also">
<title>
See Also</title>
<itemizedlist>
    <listitem><link linkend="see_Home Page"><emphasis><literal>Home Page</literal></emphasis></link></listitem>
    <listitem><link linkend="see_Frequently Asked Questions"><emphasis><literal>Frequently Asked Questions</literal></emphasis></link></listitem>
    <listitem><link linkend="see_Online Documentation"><emphasis><literal>Online Documentation</literal></emphasis></link></listitem>
    <listitem><link linkend="see_Mailing List"><emphasis><literal>Mailing List</literal></emphasis></link></listitem>
</itemizedlist>
<para>The following resources are available to get help using CMake:</para>
    <para id="see_Home Page"><sect2><title>Home Page</title></sect2> <ulink url="http://www.cmake.org" /></para>

    <para>The primary starting point for learning about CMake.</para>
    <para id="see_Frequently Asked Questions"><sect2><title>Frequently Asked Questions</title></sect2> <ulink url="http://www.cmake.org/Wiki/CMake_FAQ" /></para>

    <para>A Wiki is provided containing answers to frequently asked questions. </para>
    <para id="see_Online Documentation"><sect2><title>Online Documentation</title></sect2> <ulink url="http://www.cmake.org/HTML/Documentation.html" /></para>

    <para>Links to available documentation may be found on this web page.</para>
    <para id="see_Mailing List"><sect2><title>Mailing List</title></sect2> <ulink url="http://www.cmake.org/HTML/MailingLists.html" /></para>

    <para>For help and discussion about using cmake, a mailing list is provided at cmake@cmake.org. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at <ulink url="http://www.cmake.org" /> before posting questions to the list.</para>
<para>Summary of helpful links:
</para><literallayout>  Home: <ulink url="http://www.cmake.org" />
  Docs: <ulink url="http://www.cmake.org/HTML/Documentation.html" />
  Mail: <ulink url="http://www.cmake.org/HTML/MailingLists.html" />
  FAQ:  <ulink url="http://www.cmake.org/Wiki/CMake_FAQ" />
</literallayout>
    
</sect1>
</article>
