Windows only: Added cmake binaries to the repository in order to minimize dependencies.

This commit is contained in:
Sorin Sbarnea 2010-02-04 15:47:10 +00:00
parent 8de84743bc
commit 1150a78f15
516 changed files with 147760 additions and 0 deletions

3
hm.py
View File

@ -25,6 +25,9 @@ website_url = 'http://code.google.com/p/synergy-plus'
this_cmd = 'hm'
cmake_cmd = 'cmake'
if sys.platform == 'win32':
cmake_cmd = os.getcwd() + '\\tool\\win\\cmake\\bin\\'+ cmake_cmd
make_cmd = 'make'
xcodebuild_cmd = 'xcodebuild'

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable></noInheritable>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
<file name="msvcr90.dll" hashalg="SHA1" hash="98e8006e0a4542e69f1a3555b927758bd76ca07d"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>+CXED+6HzJlSphyMNOn27ujadC0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcp90.dll" hashalg="SHA1" hash="3aec3be680024a46813dee891a753bd58b3f3b12"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>MyKED+9DyS+1XcMeaC0Zlw2vFZ0=</dsig:DigestValue></asmv2:hash></file> <file name="msvcm90.dll" hashalg="SHA1" hash="0195dd0896d74b62531e4f3c771904a3d996450e"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>EeyDE7og6WoPd2oBhYbMEnpFHhY=</dsig:DigestValue></asmv2:hash></file>
</assembly>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,56 @@
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the names of Kitware, Inc., the Insight Software Consortium,
nor the names of their contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
The above copyright and license notice applies to distributions of
CMake in source and binary form. Some source files contain additional
notices of original copyright by their contributors; see each source
for details. Third-party software packages supplied with CMake under
compatible licenses provide their own copyright notices documented in
corresponding subdirectories.
------------------------------------------------------------------------------
CMake was initially developed by Kitware with the following sponsorship:
* National Library of Medicine at the National Institutes of Health
as part of the Insight Segmentation and Registration Toolkit (ITK).
* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
Visualization Initiative.
* National Alliance for Medical Image Computing (NAMIC) is funded by the
National Institutes of Health through the NIH Roadmap for Medical Research,
Grant U54 EB005149.
* Kitware, Inc.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,132 @@
<html><head><title>cmake-compatcommands - cmake</title></head><body>
<h2><a name="section_Index"/>Master Index CMake 2.8.0</h2>
<ul>
<li><a href="#section_Introduction"<b>Introduction</b></a></li>
<li><a href="#section_Compatibility Commands"<b>Compatibility Commands</b></a></li>
<li><a href="#section_Copyright"<b>Copyright</b></a></li>
<li><a href="#section_See Also"<b>See Also</b></a></li>
</ul>
<h2><a name="section_Introduction"/>Introduction</h2>
<ul>
</ul>
<p>cmake-compatcommands - Reference of CMake compatibility commands.
<h2><a name="section_Compatibility Commands"/>Compatibility Commands</h2>
<ul>
<li><a href="#command:build_name"><b><code>build_name</code></b></a></li> <li><a href="#command:exec_program"><b><code>exec_program</code></b></a></li> <li><a href="#command:export_library_dependencies"><b><code>export_library_dependencies</code></b></a></li> <li><a href="#command:install_files"><b><code>install_files</code></b></a></li> <li><a href="#command:install_programs"><b><code>install_programs</code></b></a></li> <li><a href="#command:install_targets"><b><code>install_targets</code></b></a></li> <li><a href="#command:link_libraries"><b><code>link_libraries</code></b></a></li> <li><a href="#command:make_directory"><b><code>make_directory</code></b></a></li> <li><a href="#command:remove"><b><code>remove</code></b></a></li> <li><a href="#command:subdir_depends"><b><code>subdir_depends</code></b></a></li> <li><a href="#command:subdirs"><b><code>subdirs</code></b></a></li> <li><a href="#command:use_mangled_mesa"><b><code>use_mangled_mesa</code></b></a></li> <li><a href="#command:utility_source"><b><code>utility_source</code></b></a></li> <li><a href="#command:variable_requires"><b><code>variable_requires</code></b></a></li> <li><a href="#command:write_file"><b><code>write_file</code></b></a></li></ul>
<pre> CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.</pre>
<p>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. ;-)
<ul>
<li>
<a name="command:build_name"><b><code>build_name</code></b></a>: Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.<br>
<pre> build_name(variable)<br></pre>
<p>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.
</li>
<li>
<a name="command:exec_program"><b><code>exec_program</code></b></a>: Deprecated. Use the execute_process() command instead.<br>
<p>Run an executable program during the processing of the CMakeList.txt file.<br><pre> exec_program(Executable [directory in which to run]<br> [ARGS &lt;arguments to executable&gt;]<br> [OUTPUT_VARIABLE &lt;var&gt;]<br> [RETURN_VALUE &lt;var&gt;])<br></pre>
<p>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.<br>
</li>
<li>
<a name="command:export_library_dependencies"><b><code>export_library_dependencies</code></b></a>: Deprecated. Use INSTALL(EXPORT) or EXPORT command.<br>
<p>This command generates an old-style library dependencies file. Projects requiring CMake 2.6 or later should not use the command. Use instead the install(EXPORT) command to help export targets from an installation tree and the export() command to export targets from a build tree.<br><p>The old-style library dependencies file does not take into account per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES target property.<br><pre> export_library_dependencies(&lt;file&gt; [APPEND])<br></pre>
<p>Create a file named &lt;file&gt; that can be included into a CMake listfile with the INCLUDE command. The file will contain a number of SET commands that will set all the variables needed for library dependency information. This should be the last command in the top level CMakeLists.txt file of the project. If the APPEND option is specified, the SET commands will be appended to the given file instead of replacing it.
</li>
<li>
<a name="command:install_files"><b><code>install_files</code></b></a>: Deprecated. Use the install(FILES ) command instead.<br>
<p>This command has been superceded by the install command. It is provided for compatibility with older CMake code. The FILES form is directly replaced by the FILES form of the install command. The regexp form can be expressed more clearly using the GLOB form of the file command.<br><pre> install_files(&lt;dir&gt; extension file file ...)<br></pre>
<p>Create rules to install the listed files with the given extension into the given directory. Only files existing in the current source tree or its corresponding location in the binary tree may be listed. If a file specified already has an extension, that extension will be removed first. This is useful for providing lists of source files such as foo.cxx when you want the corresponding foo.h to be installed. A typical extension is '.h'.<br><pre> install_files(&lt;dir&gt; regexp)<br></pre>
<p>Any files in the current source directory that match the regular expression will be installed.<br><pre> install_files(&lt;dir&gt; FILES file file ...)<br></pre>
<p>Any files listed after the FILES keyword will be installed explicitly from the names given. Full paths are allowed in this form.<br><p>The directory &lt;dir&gt; is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX.
</li>
<li>
<a name="command:install_programs"><b><code>install_programs</code></b></a>: Deprecated. Use the install(PROGRAMS ) command instead.<br>
<p>This command has been superceded by the install command. It is provided for compatibility with older CMake code. The FILES form is directly replaced by the PROGRAMS form of the INSTALL command. The regexp form can be expressed more clearly using the GLOB form of the FILE command.<br><pre> install_programs(&lt;dir&gt; file1 file2 [file3 ...])<br> install_programs(&lt;dir&gt; FILES file1 [file2 ...])<br></pre>
<p>Create rules to install the listed programs into the given directory. Use the FILES argument to guarantee that the file list version of the command will be used even when there is only one argument.<br><pre> install_programs(&lt;dir&gt; regexp)<br></pre>
<p>In the second form any program in the current source directory that matches the regular expression will be installed.<br><p>This command is intended to install programs that are not built by cmake, such as shell scripts. See the TARGETS form of the INSTALL command to create installation rules for targets built by cmake.<br><p>The directory &lt;dir&gt; is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX.
</li>
<li>
<a name="command:install_targets"><b><code>install_targets</code></b></a>: Deprecated. Use the install(TARGETS ) command instead.<br>
<p>This command has been superceded by the install command. It is provided for compatibility with older CMake code.<br><pre> install_targets(&lt;dir&gt; [RUNTIME_DIRECTORY dir] target target)<br></pre>
<p>Create rules to install the listed targets into the given directory. The directory &lt;dir&gt; is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY is specified, then on systems with special runtime files (Windows DLL), the files will be copied to that directory.
</li>
<li>
<a name="command:link_libraries"><b><code>link_libraries</code></b></a>: Deprecated. Use the target_link_libraries() command instead.<br>
<p>Link libraries to all targets added later.<br><pre> link_libraries(library1 &lt;debug | optimized&gt; library2 ...)<br></pre>
<p>Specify a list of libraries to be linked into any following targets (typically added with the add_executable or add_library calls). This command is passed down to all subdirectories. The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build.
</li>
<li>
<a name="command:make_directory"><b><code>make_directory</code></b></a>: Deprecated. Use the file(MAKE_DIRECTORY ) command instead.<br>
<pre> make_directory(directory)<br></pre>
<p>Creates the specified directory. Full paths should be given. Any parent directories that do not exist will also be created. Use with care.
</li>
<li>
<a name="command:remove"><b><code>remove</code></b></a>: Deprecated. Use the list(REMOVE_ITEM ) command instead.<br>
<pre> remove(VAR VALUE VALUE ...)<br></pre>
<p>Removes VALUE from the variable VAR. This is typically used to remove entries from a vector (e.g. semicolon separated list). VALUE is expanded.
</li>
<li>
<a name="command:subdir_depends"><b><code>subdir_depends</code></b></a>: Deprecated. Does nothing.<br>
<pre> subdir_depends(subdir dep1 dep2 ...)<br></pre>
<p>Does not do anything. This command used to help projects order parallel builds correctly. This functionality is now automatic.
</li>
<li>
<a name="command:subdirs"><b><code>subdirs</code></b></a>: Deprecated. Use the add_subdirectory() command instead.<br>
<p>Add a list of subdirectories to the build.<br><pre> subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]<br> [PREORDER] )<br></pre>
<p>Add a list of subdirectories to the build. The add_subdirectory command should be used instead of subdirs although subdirs will still work. This will cause any CMakeLists.txt files in the sub directories to be processed by CMake. Any directories after the PREORDER flag are traversed first by makefile builds, the PREORDER flag has no effect on IDE projects. Any directories after the EXCLUDE_FROM_ALL marker will not be included in the top level makefile or project file. This is useful for having CMake create makefiles or projects for a set of examples in a project. You would want CMake to generate makefiles or project files for all the examples at the same time, but you would not want them to show up in the top level project or be built each time make is run from the top.
</li>
<li>
<a name="command:use_mangled_mesa"><b><code>use_mangled_mesa</code></b></a>: Copy mesa headers for use in combination with system GL.<br>
<pre> use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)<br></pre>
<p>The path to mesa includes, should contain gl_mangle.h. The mesa headers are copied to the specified output directory. This allows mangled mesa headers to override other GL headers by being added to the include directory path earlier.
</li>
<li>
<a name="command:utility_source"><b><code>utility_source</code></b></a>: Specify the source tree of a third-party utility.<br>
<pre> utility_source(cache_entry executable_name<br> path_to_source [file1 file2 ...])<br></pre>
<p>When a third-party utility's source is included in the distribution, this command specifies its location and name. The cache entry will not be set unless the path_to_source and all listed files exist. It is assumed that the source tree of the utility will have been built before it is needed.<br><p>When cross compiling CMake will print a warning if a utility_source() command is executed, because in many cases it is used to build an executable which is executed later on. This doesn't work when cross compiling, since the executable can run only on their target platform. So in this case the cache entry has to be adjusted manually so it points to an executable which is runnable on the build host.
</li>
<li>
<a name="command:variable_requires"><b><code>variable_requires</code></b></a>: Deprecated. Use the if() command instead.<br>
<p>Assert satisfaction of an option's required variables.<br><pre> variable_requires(TEST_VARIABLE RESULT_VARIABLE<br> REQUIRED_VARIABLE1<br> REQUIRED_VARIABLE2 ...)<br></pre>
<p>The first argument (TEST_VARIABLE) is the name of the variable to be tested, if that variable is false nothing else is done. If TEST_VARIABLE is true, then the next argument (RESULT_VARIABLE) is a variable that is set to true if all the required variables are set. The rest of the arguments are variables that must be true or not set to NOTFOUND to avoid an error. If any are not true, an error is reported.
</li>
<li>
<a name="command:write_file"><b><code>write_file</code></b></a>: Deprecated. Use the file(WRITE ) command instead.<br>
<pre> write_file(filename "message to write"... [APPEND])<br></pre>
<p>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.<br><p>NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as this one but add some more functionality.<br><p>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.
</li>
</ul>
<h2><a name="section_Copyright"/>Copyright</h2>
<ul>
</ul>
<p>Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<p>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.
<p>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2><a name="section_See Also"/>See Also</h2>
<ul>
<li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li></ul>
<p>The following resources are available to get help using CMake:
<ul>
<li>
<a name="see:HomePage"><b><code>Home Page</code></b></a>: <a href="http://www.cmake.org">http://www.cmake.org</a><br>
<p>The primary starting point for learning about CMake.
</li>
<li>
<a name="see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<p>A Wiki is provided containing answers to frequently asked questions.
</li>
<li>
<a name="see:OnlineDocumentation"><b><code>Online Documentation</code></b></a>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br>
<p>Links to available documentation may be found on this web page.
</li>
<li>
<a name="see:MailingList"><b><code>Mailing List</code></b></a>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br>
<p>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 <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.
</li>
</ul>
<p>Summary of helpful links:<br><pre> Home: <a href="http://www.cmake.org">http://www.cmake.org</a><br> Docs: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br> Mail: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br> FAQ: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></pre>
</body></html>

View File

@ -0,0 +1,334 @@
cmake version 2.8.0
------------------------------------------------------------------------------
Introduction
cmake-compatcommands - Reference of CMake compatibility commands.
------------------------------------------------------------------------------
Compatibility Commands
CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
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. ;-)
build_name
Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
build_name(variable)
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.
exec_program
Deprecated. Use the execute_process() command instead.
Run an executable program during the processing of the CMakeList.txt
file.
exec_program(Executable [directory in which to run]
[ARGS <arguments to executable>]
[OUTPUT_VARIABLE <var>]
[RETURN_VALUE <var>])
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.
export_library_dependencies
Deprecated. Use INSTALL(EXPORT) or EXPORT command.
This command generates an old-style library dependencies file.
Projects requiring CMake 2.6 or later should not use the command. Use
instead the install(EXPORT) command to help export targets from an
installation tree and the export() command to export targets from a
build tree.
The old-style library dependencies file does not take into account
per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES
target property.
export_library_dependencies(<file> [APPEND])
Create a file named <file> that can be included into a CMake listfile
with the INCLUDE command. The file will contain a number of SET
commands that will set all the variables needed for library dependency
information. This should be the last command in the top level
CMakeLists.txt file of the project. If the APPEND option is
specified, the SET commands will be appended to the given file instead
of replacing it.
install_files
Deprecated. Use the install(FILES ) command instead.
This command has been superceded by the install command. It is
provided for compatibility with older CMake code. The FILES form is
directly replaced by the FILES form of the install command. The
regexp form can be expressed more clearly using the GLOB form of the
file command.
install_files(<dir> extension file file ...)
Create rules to install the listed files with the given extension into
the given directory. Only files existing in the current source tree
or its corresponding location in the binary tree may be listed. If a
file specified already has an extension, that extension will be
removed first. This is useful for providing lists of source files
such as foo.cxx when you want the corresponding foo.h to be installed.
A typical extension is '.h'.
install_files(<dir> regexp)
Any files in the current source directory that match the regular
expression will be installed.
install_files(<dir> FILES file file ...)
Any files listed after the FILES keyword will be installed explicitly
from the names given. Full paths are allowed in this form.
The directory <dir> is relative to the installation prefix, which is
stored in the variable CMAKE_INSTALL_PREFIX.
install_programs
Deprecated. Use the install(PROGRAMS ) command instead.
This command has been superceded by the install command. It is
provided for compatibility with older CMake code. The FILES form is
directly replaced by the PROGRAMS form of the INSTALL command. The
regexp form can be expressed more clearly using the GLOB form of the
FILE command.
install_programs(<dir> file1 file2 [file3 ...])
install_programs(<dir> FILES file1 [file2 ...])
Create rules to install the listed programs into the given directory.
Use the FILES argument to guarantee that the file list version of the
command will be used even when there is only one argument.
install_programs(<dir> regexp)
In the second form any program in the current source directory that
matches the regular expression will be installed.
This command is intended to install programs that are not built by
cmake, such as shell scripts. See the TARGETS form of the INSTALL
command to create installation rules for targets built by cmake.
The directory <dir> is relative to the installation prefix, which is
stored in the variable CMAKE_INSTALL_PREFIX.
install_targets
Deprecated. Use the install(TARGETS ) command instead.
This command has been superceded by the install command. It is
provided for compatibility with older CMake code.
install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
Create rules to install the listed targets into the given directory.
The directory <dir> is relative to the installation prefix, which is
stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY is
specified, then on systems with special runtime files (Windows DLL),
the files will be copied to that directory.
link_libraries
Deprecated. Use the target_link_libraries() command instead.
Link libraries to all targets added later.
link_libraries(library1 <debug | optimized> library2 ...)
Specify a list of libraries to be linked into any following targets
(typically added with the add_executable or add_library calls). This
command is passed down to all subdirectories. The debug and optimized
strings may be used to indicate that the next library listed is to be
used only for that specific type of build.
make_directory
Deprecated. Use the file(MAKE_DIRECTORY ) command instead.
make_directory(directory)
Creates the specified directory. Full paths should be given. Any
parent directories that do not exist will also be created. Use with
care.
remove
Deprecated. Use the list(REMOVE_ITEM ) command instead.
remove(VAR VALUE VALUE ...)
Removes VALUE from the variable VAR. This is typically used to remove
entries from a vector (e.g. semicolon separated list). VALUE is
expanded.
subdir_depends
Deprecated. Does nothing.
subdir_depends(subdir dep1 dep2 ...)
Does not do anything. This command used to help projects order
parallel builds correctly. This functionality is now automatic.
subdirs
Deprecated. Use the add_subdirectory() command instead.
Add a list of subdirectories to the build.
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
[PREORDER] )
Add a list of subdirectories to the build. The add_subdirectory
command should be used instead of subdirs although subdirs will still
work. This will cause any CMakeLists.txt files in the sub directories
to be processed by CMake. Any directories after the PREORDER flag are
traversed first by makefile builds, the PREORDER flag has no effect on
IDE projects. Any directories after the EXCLUDE_FROM_ALL marker will
not be included in the top level makefile or project file. This is
useful for having CMake create makefiles or projects for a set of
examples in a project. You would want CMake to generate makefiles or
project files for all the examples at the same time, but you would not
want them to show up in the top level project or be built each time
make is run from the top.
use_mangled_mesa
Copy mesa headers for use in combination with system GL.
use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)
The path to mesa includes, should contain gl_mangle.h. The mesa
headers are copied to the specified output directory. This allows
mangled mesa headers to override other GL headers by being added to
the include directory path earlier.
utility_source
Specify the source tree of a third-party utility.
utility_source(cache_entry executable_name
path_to_source [file1 file2 ...])
When a third-party utility's source is included in the distribution,
this command specifies its location and name. The cache entry will
not be set unless the path_to_source and all listed files exist. It
is assumed that the source tree of the utility will have been built
before it is needed.
When cross compiling CMake will print a warning if a utility_source()
command is executed, because in many cases it is used to build an
executable which is executed later on. This doesn't work when cross
compiling, since the executable can run only on their target platform.
So in this case the cache entry has to be adjusted manually so it
points to an executable which is runnable on the build host.
variable_requires
Deprecated. Use the if() command instead.
Assert satisfaction of an option's required variables.
variable_requires(TEST_VARIABLE RESULT_VARIABLE
REQUIRED_VARIABLE1
REQUIRED_VARIABLE2 ...)
The first argument (TEST_VARIABLE) is the name of the variable to be
tested, if that variable is false nothing else is done. If
TEST_VARIABLE is true, then the next argument (RESULT_VARIABLE) is a
variable that is set to true if all the required variables are set.
The rest of the arguments are variables that must be true or not set
to NOTFOUND to avoid an error. If any are not true, an error is
reported.
write_file
Deprecated. Use the file(WRITE ) command instead.
write_file(filename "message to write"... [APPEND])
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.
NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as
this one but add some more functionality.
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.
------------------------------------------------------------------------------
Copyright
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the
names of their contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
See Also
The following resources are available to get help using CMake:
Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
Mailing List
http://www.cmake.org/HTML/MailingLists.html
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
http://www.cmake.org before posting questions to the list.
Summary of helpful links:
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
<html><head><title>cmake-policies - cmake</title></head><body>
<h2><a name="section_Index"/>Master Index CMake 2.8.0</h2>
<ul>
<li><a href="#section_Introduction"<b>Introduction</b></a></li>
<li><a href="#section_Description"<b>Description</b></a></li>
<li><a href="#section_Policies"<b>Policies</b></a></li>
<li><a href="#section_Copyright"<b>Copyright</b></a></li>
<li><a href="#section_See Also"<b>See Also</b></a></li>
</ul>
<h2><a name="section_Introduction"/>Introduction</h2>
<ul>
</ul>
<p>cmake-policies - Reference of CMake policies.
<h2><a name="section_Description"/>Description</h2>
<ul>
</ul>
<p>The "cmake" executable is the CMake command-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the -D option. The -i option will cause cmake to interactively prompt for such settings.
<p>CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.
<h2><a name="section_Policies"/>Policies</h2>
<ul>
<li><a href="#policy:CMP0000"><b><code>CMP0000</code></b></a></li> <li><a href="#policy:CMP0001"><b><code>CMP0001</code></b></a></li> <li><a href="#policy:CMP0002"><b><code>CMP0002</code></b></a></li> <li><a href="#policy:CMP0003"><b><code>CMP0003</code></b></a></li> <li><a href="#policy:CMP0004"><b><code>CMP0004</code></b></a></li> <li><a href="#policy:CMP0005"><b><code>CMP0005</code></b></a></li> <li><a href="#policy:CMP0006"><b><code>CMP0006</code></b></a></li> <li><a href="#policy:CMP0007"><b><code>CMP0007</code></b></a></li> <li><a href="#policy:CMP0008"><b><code>CMP0008</code></b></a></li> <li><a href="#policy:CMP0009"><b><code>CMP0009</code></b></a></li> <li><a href="#policy:CMP0010"><b><code>CMP0010</code></b></a></li> <li><a href="#policy:CMP0011"><b><code>CMP0011</code></b></a></li> <li><a href="#policy:CMP0012"><b><code>CMP0012</code></b></a></li> <li><a href="#policy:CMP0013"><b><code>CMP0013</code></b></a></li> <li><a href="#policy:CMP0014"><b><code>CMP0014</code></b></a></li></ul>
<ul>
<li>
<a name="policy:CMP0000"><b><code>CMP0000</code></b></a>: A minimum required CMake version must be specified.<br>
<p>CMake requires that projects specify the version of CMake to which they have been written. This policy has been put in place so users trying to build the project may be told when they need to update their CMake. Specifying a version also helps the project build with CMake versions newer than that specified. Use the cmake_minimum_required command at the top of your main CMakeLists.txt file:<br><pre> cmake_minimum_required(VERSION &lt;major&gt;.&lt;minor&gt;)<br></pre>
<p>where "&lt;major&gt;.&lt;minor&gt;" is the version of CMake you want to support (such as "2.6"). The command will ensure that at least the given version of CMake is running and help newer versions be compatible with the project. See documentation of cmake_minimum_required for details.<br><p>Note that the command invocation must appear in the CMakeLists.txt file itself; a call in an included file is not sufficient. However, the cmake_policy command may be called to set policy CMP0000 to OLD or NEW behavior explicitly. The OLD behavior is to silently ignore the missing invocation. The NEW behavior is to issue an error instead of a warning. An included file may set CMP0000 explicitly to affect how this policy is enforced for the main CMakeLists.txt file.<br><p>This policy was introduced in CMake version 2.6.0.
</li>
<li>
<a name="policy:CMP0001"><b><code>CMP0001</code></b></a>: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.<br>
<p>The OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present it to the user. The NEW behavior is to ignore CMAKE_BACKWARDS_COMPATIBILITY completely.<br><p>In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was used to request compatibility with earlier versions of CMake. In CMake 2.6 and above all compatibility issues are handled by policies and the cmake_policy command. However, CMake must still check CMAKE_BACKWARDS_COMPATIBILITY for projects written for CMake 2.4 and below.<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0002"><b><code>CMP0002</code></b></a>: Logical target names must be globally unique.<br>
<p>Targets names created with add_executable, add_library, or add_custom_target are logical build target names. Logical target names must be globally unique because:<br><pre> - Unique names may be referenced unambiguously both in CMake<br> code and on make tool command lines.<br> - Logical names are used by Xcode and VS IDE generators<br> to produce meaningful project names for the targets.<br></pre>
<p>The logical name of executable and library targets does not have to correspond to the physical file names built. Consider using the OUTPUT_NAME target property to create two targets with the same physical name while keeping logical names distinct. Custom targets must simply have globally unique names (unless one uses the global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0003"><b><code>CMP0003</code></b></a>: Libraries linked via full path no longer produce linker search paths.<br>
<p>This policy affects how libraries whose full paths are NOT known are found at link time, but was created due to a change in how CMake deals with libraries whose full paths are known. Consider the code<br><pre> target_link_libraries(myexe /path/to/libA.so)<br></pre>
<p>CMake 2.4 and below implemented linking to libraries whose full paths are known by splitting them on the link line into separate components consisting of the linker search path and the library name. The example code might have produced something like<br><pre> ... -L/path/to -lA ...<br></pre>
<p>in order to link to library A. An analysis was performed to order multiple link directories such that the linker would find library A in the desired location, but there are cases in which this does not work. CMake versions 2.6 and above use the more reliable approach of passing the full path to libraries directly to the linker in most cases. The example code now produces something like<br><pre> ... /path/to/libA.so ....<br></pre>
<p>Unfortunately this change can break code like<br><pre> target_link_libraries(myexe /path/to/libA.so B)<br></pre>
<p>where "B" is meant to find "/path/to/libB.so". This code is wrong because the user is asking the linker to find library B but has not provided a linker search path (which may be added with the link_directories command). However, with the old linking implementation the code would work accidentally because the linker search path added for library A allowed library B to be found.<br><p>In order to support projects depending on linker search paths added by linking to libraries with known full paths, the OLD behavior for this policy will add the linker search paths even though they are not needed for their own libraries. When this policy is set to OLD, CMake will produce a link line such as<br><pre> ... -L/path/to /path/to/libA.so -lB ...<br></pre>
<p>which will allow library B to be found as it was previously. When this policy is set to NEW, CMake will produce a link line such as<br><pre> ... /path/to/libA.so -lB ...<br></pre>
<p>which more accurately matches what the project specified.<br><p>The setting for this policy used when generating the link line is that in effect when the target is created by an add_executable or add_library command. For the example described above, the code<br><pre> cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)<br> add_executable(myexe myexe.c)<br> target_link_libraries(myexe /path/to/libA.so B)<br></pre>
<p>will work and suppress the warning for this policy. It may also be updated to work with the corrected linking approach:<br><pre> cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)<br> link_directories(/path/to) # needed to find library B<br> add_executable(myexe myexe.c)<br> target_link_libraries(myexe /path/to/libA.so B)<br></pre>
<p>Even better, library B may be specified with a full path:<br><pre> add_executable(myexe myexe.c)<br> target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)<br></pre>
<p>When all items on the link line have known paths CMake does not check this policy so it has no effect.<br><p>Note that the warning for this policy will be issued for at most one target. This avoids flooding users with messages for every target when setting the policy once will probably fix all targets.<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0004"><b><code>CMP0004</code></b></a>: Libraries linked may not have leading or trailing whitespace.<br>
<p>CMake versions 2.4 and below silently removed leading and trailing whitespace from libraries linked with code like<br><pre> target_link_libraries(myexe " A ")<br></pre>
<p>This could lead to subtle errors in user projects.<br><p>The OLD behavior for this policy is to silently remove leading and trailing whitespace. The NEW behavior for this policy is to diagnose the existence of such whitespace as an error. The setting for this policy used when checking the library names is that in effect when the target is created by an add_executable or add_library command.<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0005"><b><code>CMP0005</code></b></a>: Preprocessor definition values are now escaped automatically.<br>
<p>This policy determines whether or not CMake should generate escaped preprocessor definition values added via add_definitions. CMake versions 2.4 and below assumed that only trivial values would be given for macros in add_definitions calls. It did not attempt to escape non-trivial values such as string literals in generated build rules. CMake versions 2.6 and above support escaping of most values, but cannot assume the user has not added escapes already in an attempt to work around limitations in earlier versions.<br><p>The OLD behavior for this policy is to place definition values given to add_definitions directly in the generated build rules without attempting to escape anything. The NEW behavior for this policy is to generate correct escapes for all native build tools automatically. See documentation of the COMPILE_DEFINITIONS target property for limitations of the escaping implementation.<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0006"><b><code>CMP0006</code></b></a>: Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.<br>
<p>This policy determines whether the install(TARGETS) command must be given a BUNDLE DESTINATION when asked to install a target with the MACOSX_BUNDLE property set. CMake 2.4 and below did not distinguish application bundles from normal executables when installing targets. CMake 2.6 provides a BUNDLE option to the install(TARGETS) command that specifies rules specific to application bundles on the Mac. Projects should use this option when installing a target with the MACOSX_BUNDLE property set.<br><p>The OLD behavior for this policy is to fall back to the RUNTIME DESTINATION if a BUNDLE DESTINATION is not given. The NEW behavior for this policy is to produce an error if a bundle target is installed without a BUNDLE DESTINATION.<br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0007"><b><code>CMP0007</code></b></a>: list command no longer ignores empty elements.<br>
<p>This policy determines whether the list command will ignore empty elements in the list. CMake 2.4 and below list commands ignored all empty elements in the list. For example, a;b;;c would have length 3 and not 4. The OLD behavior for this policy is to ignore empty list elements. The NEW behavior for this policy is to correctly count empty elements in a list. <br><p>This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0008"><b><code>CMP0008</code></b></a>: Libraries linked by full-path must have a valid library file name.<br>
<p>In CMake 2.4 and below it is possible to write code like<br><pre> target_link_libraries(myexe /full/path/to/somelib)<br></pre>
<p>where "somelib" is supposed to be a valid library file name such as "libsomelib.a" or "somelib.lib". For Makefile generators this produces an error at build time because the dependency on the full path cannot be found. For VS IDE and Xcode generators this used to work by accident because CMake would always split off the library directory and ask the linker to search for the library by name (-lsomelib or somelib.lib). Despite the failure with Makefiles, some projects have code like this and build only with VS and/or Xcode. This version of CMake prefers to pass the full path directly to the native build tool, which will fail in this case because it does not name a valid library file.<br><p>This policy determines what to do with full paths that do not appear to name a valid library file. The OLD behavior for this policy is to split the library name from the path and ask the linker to search for it. The NEW behavior for this policy is to trust the given path and pass it directly to the native build tool unchanged.<br><p>This policy was introduced in CMake version 2.6.1. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0009"><b><code>CMP0009</code></b></a>: FILE GLOB_RECURSE calls should not follow symlinks by default.<br>
<p>In CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow through symlinks, sometimes coming up with unexpectedly large result sets because of symlinks to top level directories that contain hundreds of thousands of files.<br><p>This policy determines whether or not to follow symlinks encountered during a FILE GLOB_RECURSE call. The OLD behavior for this policy is to follow the symlinks. The NEW behavior for this policy is not to follow the symlinks by default, but only if FOLLOW_SYMLINKS is given as an additional argument to the FILE command.<br><p>This policy was introduced in CMake version 2.6.2. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0010"><b><code>CMP0010</code></b></a>: Bad variable reference syntax is an error.<br>
<p>In CMake 2.6.2 and below, incorrect variable reference syntax such as a missing close-brace ("${FOO") was reported but did not stop processing of CMake code. This policy determines whether a bad variable reference is an error. The OLD behavior for this policy is to warn about the error, leave the string untouched, and continue. The NEW behavior for this policy is to report an error.<br><p>This policy was introduced in CMake version 2.6.3. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0011"><b><code>CMP0011</code></b></a>: Included scripts do automatic cmake_policy PUSH and POP.<br>
<p>In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by the include() and find_package() commands would affect the includer. Explicit invocations of cmake_policy(PUSH) and cmake_policy(POP) were required to isolate policy changes and protect the includer. While some scripts intend to affect the policies of their includer, most do not. In CMake 2.6.3 and above, include() and find_package() by default PUSH and POP an entry on the policy stack around an included script, but provide a NO_POLICY_SCOPE option to disable it. This policy determines whether or not to imply NO_POLICY_SCOPE for compatibility. The OLD behavior for this policy is to imply NO_POLICY_SCOPE for include() and find_package() commands. The NEW behavior for this policy is to allow the commands to do their default cmake_policy PUSH and POP.<br><p>This policy was introduced in CMake version 2.6.3. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0012"><b><code>CMP0012</code></b></a>: if() recognizes numbers and boolean constants.<br>
<p>In CMake versions 2.6.4 and lower the if() command implicitly dereferenced arguments corresponding to variables, even those named like numbers or boolean constants, except for 0 and 1. Numbers and boolean constants such as true, false, yes, no, on, off, y, n, notfound, ignore (all case insensitive) were recognized in some cases but not all. For example, the code "if(TRUE)" might have evaluated as false. Numbers such as 2 were recognized only in boolean expressions like "if(NOT 2)" (leading to false) but not as a single-argument like "if(2)" (also leading to false). Later versions of CMake prefer to treat numbers and boolean constants literally, so they should not be used as variable names.<br><p>The OLD behavior for this policy is to implicitly dereference variables named like numbers and boolean constants. The NEW behavior for this policy is to recognize numbers and boolean constants without dereferencing variables with such names.<br><p>This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0013"><b><code>CMP0013</code></b></a>: Duplicate binary directories are not allowed.<br>
<p>CMake 2.6.3 and below silently permitted add_subdirectory() calls to create the same binary directory multiple times. During build system generation files would be written and then overwritten in the build tree and could lead to strange behavior. CMake 2.6.4 and above explicitly detect duplicate binary directories. CMake 2.6.4 always considers this case an error. In CMake 2.8.0 and above this policy determines whether or not the case is an error. The OLD behavior for this policy is to allow duplicate binary directories. The NEW behavior for this policy is to disallow duplicate binary directories with an error.<br><p>This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
<li>
<a name="policy:CMP0014"><b><code>CMP0014</code></b></a>: Input directories must have CMakeLists.txt.<br>
<p>CMake versions before 2.8 silently ignored missing CMakeLists.txt files in directories referenced by add_subdirectory() or subdirs(), treating them as if present but empty. In CMake 2.8.0 and above this policy determines whether or not the case is an error. The OLD behavior for this policy is to silently ignore the problem. The NEW behavior for this policy is to report an error.<br><p>This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
</li>
</ul>
<h2><a name="section_Copyright"/>Copyright</h2>
<ul>
</ul>
<p>Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<p>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.
<p>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2><a name="section_See Also"/>See Also</h2>
<ul>
<li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li></ul>
<p>.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmakemodules(1), cmakeprops(1), cmakevars(1)
<p>The following resources are available to get help using CMake:
<ul>
<li>
<a name="see:HomePage"><b><code>Home Page</code></b></a>: <a href="http://www.cmake.org">http://www.cmake.org</a><br>
<p>The primary starting point for learning about CMake.
</li>
<li>
<a name="see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<p>A Wiki is provided containing answers to frequently asked questions.
</li>
<li>
<a name="see:OnlineDocumentation"><b><code>Online Documentation</code></b></a>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br>
<p>Links to available documentation may be found on this web page.
</li>
<li>
<a name="see:MailingList"><b><code>Mailing List</code></b></a>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br>
<p>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 <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.
</li>
</ul>
<p>Summary of helpful links:<br><pre> Home: <a href="http://www.cmake.org">http://www.cmake.org</a><br> Docs: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br> Mail: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br> FAQ: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></pre>
</body></html>

View File

@ -0,0 +1,461 @@
cmake version 2.8.0
------------------------------------------------------------------------------
Introduction
cmake-policies - Reference of CMake policies.
------------------------------------------------------------------------------
Description
The "cmake" executable is the CMake command-line interface. It may be used
to configure projects in scripts. Project configuration settings may be
specified on the command line with the -D option. The -i option will cause
cmake to interactively prompt for such settings.
CMake is a cross-platform build system generator. Projects specify their
build process with platform-independent CMake listfiles included in each
directory of a source tree with the name CMakeLists.txt. Users build a
project by using CMake to generate a build system for a native tool on their
platform.
------------------------------------------------------------------------------
Policies
CMP0000
A minimum required CMake version must be specified.
CMake requires that projects specify the version of CMake to which
they have been written. This policy has been put in place so users
trying to build the project may be told when they need to update their
CMake. Specifying a version also helps the project build with CMake
versions newer than that specified. Use the cmake_minimum_required
command at the top of your main CMakeLists.txt file:
cmake_minimum_required(VERSION <major>.<minor>)
where "<major>.<minor>" is the version of CMake you want to support
(such as "2.6"). The command will ensure that at least the given
version of CMake is running and help newer versions be compatible with
the project. See documentation of cmake_minimum_required for details.
Note that the command invocation must appear in the CMakeLists.txt
file itself; a call in an included file is not sufficient. However,
the cmake_policy command may be called to set policy CMP0000 to OLD or
NEW behavior explicitly. The OLD behavior is to silently ignore the
missing invocation. The NEW behavior is to issue an error instead of
a warning. An included file may set CMP0000 explicitly to affect how
this policy is enforced for the main CMakeLists.txt file.
This policy was introduced in CMake version 2.6.0.
CMP0001
CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
The OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present
it to the user. The NEW behavior is to ignore
CMAKE_BACKWARDS_COMPATIBILITY completely.
In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was
used to request compatibility with earlier versions of CMake. In
CMake 2.6 and above all compatibility issues are handled by policies
and the cmake_policy command. However, CMake must still check
CMAKE_BACKWARDS_COMPATIBILITY for projects written for CMake 2.4 and
below.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0002
Logical target names must be globally unique.
Targets names created with add_executable, add_library, or
add_custom_target are logical build target names. Logical target
names must be globally unique because:
- Unique names may be referenced unambiguously both in CMake
code and on make tool command lines.
- Logical names are used by Xcode and VS IDE generators
to produce meaningful project names for the targets.
The logical name of executable and library targets does not have to
correspond to the physical file names built. Consider using the
OUTPUT_NAME target property to create two targets with the same
physical name while keeping logical names distinct. Custom targets
must simply have globally unique names (unless one uses the global
property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0003
Libraries linked via full path no longer produce linker search paths.
This policy affects how libraries whose full paths are NOT known are
found at link time, but was created due to a change in how CMake deals
with libraries whose full paths are known. Consider the code
target_link_libraries(myexe /path/to/libA.so)
CMake 2.4 and below implemented linking to libraries whose full paths
are known by splitting them on the link line into separate components
consisting of the linker search path and the library name. The
example code might have produced something like
... -L/path/to -lA ...
in order to link to library A. An analysis was performed to order
multiple link directories such that the linker would find library A in
the desired location, but there are cases in which this does not work.
CMake versions 2.6 and above use the more reliable approach of passing
the full path to libraries directly to the linker in most cases. The
example code now produces something like
... /path/to/libA.so ....
Unfortunately this change can break code like
target_link_libraries(myexe /path/to/libA.so B)
where "B" is meant to find "/path/to/libB.so". This code is wrong
because the user is asking the linker to find library B but has not
provided a linker search path (which may be added with the
link_directories command). However, with the old linking
implementation the code would work accidentally because the linker
search path added for library A allowed library B to be found.
In order to support projects depending on linker search paths added by
linking to libraries with known full paths, the OLD behavior for this
policy will add the linker search paths even though they are not
needed for their own libraries. When this policy is set to OLD, CMake
will produce a link line such as
... -L/path/to /path/to/libA.so -lB ...
which will allow library B to be found as it was previously. When
this policy is set to NEW, CMake will produce a link line such as
... /path/to/libA.so -lB ...
which more accurately matches what the project specified.
The setting for this policy used when generating the link line is that
in effect when the target is created by an add_executable or
add_library command. For the example described above, the code
cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so B)
will work and suppress the warning for this policy. It may also be
updated to work with the corrected linking approach:
cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
link_directories(/path/to) # needed to find library B
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so B)
Even better, library B may be specified with a full path:
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)
When all items on the link line have known paths CMake does not check
this policy so it has no effect.
Note that the warning for this policy will be issued for at most one
target. This avoids flooding users with messages for every target
when setting the policy once will probably fix all targets.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0004
Libraries linked may not have leading or trailing whitespace.
CMake versions 2.4 and below silently removed leading and trailing
whitespace from libraries linked with code like
target_link_libraries(myexe " A ")
This could lead to subtle errors in user projects.
The OLD behavior for this policy is to silently remove leading and
trailing whitespace. The NEW behavior for this policy is to diagnose
the existence of such whitespace as an error. The setting for this
policy used when checking the library names is that in effect when the
target is created by an add_executable or add_library command.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0005
Preprocessor definition values are now escaped automatically.
This policy determines whether or not CMake should generate escaped
preprocessor definition values added via add_definitions. CMake
versions 2.4 and below assumed that only trivial values would be given
for macros in add_definitions calls. It did not attempt to escape
non-trivial values such as string literals in generated build rules.
CMake versions 2.6 and above support escaping of most values, but
cannot assume the user has not added escapes already in an attempt to
work around limitations in earlier versions.
The OLD behavior for this policy is to place definition values given
to add_definitions directly in the generated build rules without
attempting to escape anything. The NEW behavior for this policy is to
generate correct escapes for all native build tools automatically.
See documentation of the COMPILE_DEFINITIONS target property for
limitations of the escaping implementation.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0006
Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.
This policy determines whether the install(TARGETS) command must be
given a BUNDLE DESTINATION when asked to install a target with the
MACOSX_BUNDLE property set. CMake 2.4 and below did not distinguish
application bundles from normal executables when installing targets.
CMake 2.6 provides a BUNDLE option to the install(TARGETS) command
that specifies rules specific to application bundles on the Mac.
Projects should use this option when installing a target with the
MACOSX_BUNDLE property set.
The OLD behavior for this policy is to fall back to the RUNTIME
DESTINATION if a BUNDLE DESTINATION is not given. The NEW behavior
for this policy is to produce an error if a bundle target is installed
without a BUNDLE DESTINATION.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0007
list command no longer ignores empty elements.
This policy determines whether the list command will ignore empty
elements in the list. CMake 2.4 and below list commands ignored all
empty elements in the list. For example, a;b;;c would have length 3
and not 4. The OLD behavior for this policy is to ignore empty list
elements. The NEW behavior for this policy is to correctly count
empty elements in a list.
This policy was introduced in CMake version 2.6.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0008
Libraries linked by full-path must have a valid library file name.
In CMake 2.4 and below it is possible to write code like
target_link_libraries(myexe /full/path/to/somelib)
where "somelib" is supposed to be a valid library file name such as
"libsomelib.a" or "somelib.lib". For Makefile generators this
produces an error at build time because the dependency on the full
path cannot be found. For VS IDE and Xcode generators this used to
work by accident because CMake would always split off the library
directory and ask the linker to search for the library by name
(-lsomelib or somelib.lib). Despite the failure with Makefiles, some
projects have code like this and build only with VS and/or Xcode.
This version of CMake prefers to pass the full path directly to the
native build tool, which will fail in this case because it does not
name a valid library file.
This policy determines what to do with full paths that do not appear
to name a valid library file. The OLD behavior for this policy is to
split the library name from the path and ask the linker to search for
it. The NEW behavior for this policy is to trust the given path and
pass it directly to the native build tool unchanged.
This policy was introduced in CMake version 2.6.1. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0009
FILE GLOB_RECURSE calls should not follow symlinks by default.
In CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow through
symlinks, sometimes coming up with unexpectedly large result sets
because of symlinks to top level directories that contain hundreds of
thousands of files.
This policy determines whether or not to follow symlinks encountered
during a FILE GLOB_RECURSE call. The OLD behavior for this policy is
to follow the symlinks. The NEW behavior for this policy is not to
follow the symlinks by default, but only if FOLLOW_SYMLINKS is given
as an additional argument to the FILE command.
This policy was introduced in CMake version 2.6.2. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0010
Bad variable reference syntax is an error.
In CMake 2.6.2 and below, incorrect variable reference syntax such as
a missing close-brace ("${FOO") was reported but did not stop
processing of CMake code. This policy determines whether a bad
variable reference is an error. The OLD behavior for this policy is
to warn about the error, leave the string untouched, and continue.
The NEW behavior for this policy is to report an error.
This policy was introduced in CMake version 2.6.3. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0011
Included scripts do automatic cmake_policy PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
the include() and find_package() commands would affect the includer.
Explicit invocations of cmake_policy(PUSH) and cmake_policy(POP) were
required to isolate policy changes and protect the includer. While
some scripts intend to affect the policies of their includer, most do
not. In CMake 2.6.3 and above, include() and find_package() by
default PUSH and POP an entry on the policy stack around an included
script, but provide a NO_POLICY_SCOPE option to disable it. This
policy determines whether or not to imply NO_POLICY_SCOPE for
compatibility. The OLD behavior for this policy is to imply
NO_POLICY_SCOPE for include() and find_package() commands. The NEW
behavior for this policy is to allow the commands to do their default
cmake_policy PUSH and POP.
This policy was introduced in CMake version 2.6.3. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0012
if() recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the if() command implicitly
dereferenced arguments corresponding to variables, even those named
like numbers or boolean constants, except for 0 and 1. Numbers and
boolean constants such as true, false, yes, no, on, off, y, n,
notfound, ignore (all case insensitive) were recognized in some cases
but not all. For example, the code "if(TRUE)" might have evaluated as
false. Numbers such as 2 were recognized only in boolean expressions
like "if(NOT 2)" (leading to false) but not as a single-argument like
"if(2)" (also leading to false). Later versions of CMake prefer to
treat numbers and boolean constants literally, so they should not be
used as variable names.
The OLD behavior for this policy is to implicitly dereference
variables named like numbers and boolean constants. The NEW behavior
for this policy is to recognize numbers and boolean constants without
dereferencing variables with such names.
This policy was introduced in CMake version 2.8.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0013
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to
create the same binary directory multiple times. During build system
generation files would be written and then overwritten in the build
tree and could lead to strange behavior. CMake 2.6.4 and above
explicitly detect duplicate binary directories. CMake 2.6.4 always
considers this case an error. In CMake 2.8.0 and above this policy
determines whether or not the case is an error. The OLD behavior for
this policy is to allow duplicate binary directories. The NEW
behavior for this policy is to disallow duplicate binary directories
with an error.
This policy was introduced in CMake version 2.8.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
CMP0014
Input directories must have CMakeLists.txt.
CMake versions before 2.8 silently ignored missing CMakeLists.txt
files in directories referenced by add_subdirectory() or subdirs(),
treating them as if present but empty. In CMake 2.8.0 and above this
policy determines whether or not the case is an error. The OLD
behavior for this policy is to silently ignore the problem. The NEW
behavior for this policy is to report an error.
This policy was introduced in CMake version 2.8.0. CMake version
2.8.0 warns when the policy is not set and uses OLD behavior. Use the
cmake_policy command to set it to OLD or NEW explicitly.
------------------------------------------------------------------------------
Copyright
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the
names of their contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
See Also
.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1),
cmakemodules(1), cmakeprops(1), cmakevars(1)
The following resources are available to get help using CMake:
Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
Mailing List
http://www.cmake.org/HTML/MailingLists.html
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
http://www.cmake.org before posting questions to the list.
Summary of helpful links:
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,662 @@
<html><head><title>cmake-variables - cmake</title></head><body>
<h2><a name="section_Index"/>Master Index CMake 2.8.0</h2>
<ul>
<li><a href="#section_Introduction"<b>Introduction</b></a></li>
<li><a href="#section_Variables that Provide Information"<b>Variables that Provide Information</b></a></li>
<li><a href="#section_Variables That Change Behavior"<b>Variables That Change Behavior</b></a></li>
<li><a href="#section_Variables That Describe the System"<b>Variables That Describe the System</b></a></li>
<li><a href="#section_Variables that Control the Build"<b>Variables that Control the Build</b></a></li>
<li><a href="#section_Variables for Languages"<b>Variables for Languages</b></a></li>
<li><a href="#section_Copyright"<b>Copyright</b></a></li>
<li><a href="#section_See Also"<b>See Also</b></a></li>
</ul>
<h2><a name="section_Introduction"/>Introduction</h2>
<ul>
</ul>
<p>cmake-variables - Reference of CMake variables.
<h2><a name="section_Variables that Provide Information"/>Variables that Provide Information</h2>
<ul>
<li><a href="#variable:CMAKE_AR"><b><code>CMAKE_AR</code></b></a></li> <li><a href="#variable:CMAKE_BINARY_DIR"><b><code>CMAKE_BINARY_DIR</code></b></a></li> <li><a href="#variable:CMAKE_BUILD_TOOL"><b><code>CMAKE_BUILD_TOOL</code></b></a></li> <li><a href="#variable:CMAKE_CACHEFILE_DIR"><b><code>CMAKE_CACHEFILE_DIR</code></b></a></li> <li><a href="#variable:CMAKE_CACHE_MAJOR_VERSION"><b><code>CMAKE_CACHE_MAJOR_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_CACHE_MINOR_VERSION"><b><code>CMAKE_CACHE_MINOR_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_CACHE_PATCH_VERSION"><b><code>CMAKE_CACHE_PATCH_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_CFG_INTDIR"><b><code>CMAKE_CFG_INTDIR</code></b></a></li> <li><a href="#variable:CMAKE_COMMAND"><b><code>CMAKE_COMMAND</code></b></a></li> <li><a href="#variable:CMAKE_CROSSCOMPILING"><b><code>CMAKE_CROSSCOMPILING</code></b></a></li> <li><a href="#variable:CMAKE_CTEST_COMMAND"><b><code>CMAKE_CTEST_COMMAND</code></b></a></li> <li><a href="#variable:CMAKE_CURRENT_BINARY_DIR"><b><code>CMAKE_CURRENT_BINARY_DIR</code></b></a></li> <li><a href="#variable:CMAKE_CURRENT_LIST_FILE"><b><code>CMAKE_CURRENT_LIST_FILE</code></b></a></li> <li><a href="#variable:CMAKE_CURRENT_LIST_LINE"><b><code>CMAKE_CURRENT_LIST_LINE</code></b></a></li> <li><a href="#variable:CMAKE_CURRENT_SOURCE_DIR"><b><code>CMAKE_CURRENT_SOURCE_DIR</code></b></a></li> <li><a href="#variable:CMAKE_DL_LIBS"><b><code>CMAKE_DL_LIBS</code></b></a></li> <li><a href="#variable:CMAKE_EDIT_COMMAND"><b><code>CMAKE_EDIT_COMMAND</code></b></a></li> <li><a href="#variable:CMAKE_EXECUTABLE_SUFFIX"><b><code>CMAKE_EXECUTABLE_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES"><b><code>CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES</code></b></a></li> <li><a href="#variable:CMAKE_GENERATOR"><b><code>CMAKE_GENERATOR</code></b></a></li> <li><a href="#variable:CMAKE_HOME_DIRECTORY"><b><code>CMAKE_HOME_DIRECTORY</code></b></a></li> <li><a href="#variable:CMAKE_IMPORT_LIBRARY_PREFIX"><b><code>CMAKE_IMPORT_LIBRARY_PREFIX</code></b></a></li> <li><a href="#variable:CMAKE_IMPORT_LIBRARY_SUFFIX"><b><code>CMAKE_IMPORT_LIBRARY_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_LINK_LIBRARY_SUFFIX"><b><code>CMAKE_LINK_LIBRARY_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_MAJOR_VERSION"><b><code>CMAKE_MAJOR_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_MAKE_PROGRAM"><b><code>CMAKE_MAKE_PROGRAM</code></b></a></li> <li><a href="#variable:CMAKE_MINOR_VERSION"><b><code>CMAKE_MINOR_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_PARENT_LIST_FILE"><b><code>CMAKE_PARENT_LIST_FILE</code></b></a></li> <li><a href="#variable:CMAKE_PATCH_VERSION"><b><code>CMAKE_PATCH_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_PROJECT_NAME"><b><code>CMAKE_PROJECT_NAME</code></b></a></li> <li><a href="#variable:CMAKE_RANLIB"><b><code>CMAKE_RANLIB</code></b></a></li> <li><a href="#variable:CMAKE_ROOT"><b><code>CMAKE_ROOT</code></b></a></li> <li><a href="#variable:CMAKE_SHARED_LIBRARY_PREFIX"><b><code>CMAKE_SHARED_LIBRARY_PREFIX</code></b></a></li> <li><a href="#variable:CMAKE_SHARED_LIBRARY_SUFFIX"><b><code>CMAKE_SHARED_LIBRARY_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_SHARED_MODULE_PREFIX"><b><code>CMAKE_SHARED_MODULE_PREFIX</code></b></a></li> <li><a href="#variable:CMAKE_SHARED_MODULE_SUFFIX"><b><code>CMAKE_SHARED_MODULE_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_SIZEOF_VOID_P"><b><code>CMAKE_SIZEOF_VOID_P</code></b></a></li> <li><a href="#variable:CMAKE_SKIP_RPATH"><b><code>CMAKE_SKIP_RPATH</code></b></a></li> <li><a href="#variable:CMAKE_SOURCE_DIR"><b><code>CMAKE_SOURCE_DIR</code></b></a></li> <li><a href="#variable:CMAKE_STANDARD_LIBRARIES"><b><code>CMAKE_STANDARD_LIBRARIES</code></b></a></li> <li><a href="#variable:CMAKE_STATIC_LIBRARY_PREFIX"><b><code>CMAKE_STATIC_LIBRARY_PREFIX</code></b></a></li> <li><a href="#variable:CMAKE_STATIC_LIBRARY_SUFFIX"><b><code>CMAKE_STATIC_LIBRARY_SUFFIX</code></b></a></li> <li><a href="#variable:CMAKE_USING_VC_FREE_TOOLS"><b><code>CMAKE_USING_VC_FREE_TOOLS</code></b></a></li> <li><a href="#variable:CMAKE_VERBOSE_MAKEFILE"><b><code>CMAKE_VERBOSE_MAKEFILE</code></b></a></li> <li><a href="#variable:CMAKE_VERSION"><b><code>CMAKE_VERSION</code></b></a></li> <li><a href="#variable:PROJECT_BINARY_DIR"><b><code>PROJECT_BINARY_DIR</code></b></a></li> <li><a href="#variable:PROJECT_NAME"><b><code>PROJECT_NAME</code></b></a></li> <li><a href="#variable:PROJECT_SOURCE_DIR"><b><code>PROJECT_SOURCE_DIR</code></b></a></li> <li><a href="#variable:Projectname_BINARY_DIR"><b><code>[Project name]_BINARY_DIR</code></b></a></li> <li><a href="#variable:Projectname_SOURCE_DIR"><b><code>[Project name]_SOURCE_DIR</code></b></a></li></ul>
<p>variables defined by cmake, that give information about the project, and cmake
<ul>
<li>
<a name="variable:CMAKE_AR"><b><code>CMAKE_AR</code></b></a>: Name of archiving tool for static libraries.<br>
<p>This specifies name of the program that creates archive or static libraries.
</li>
<li>
<a name="variable:CMAKE_BINARY_DIR"><b><code>CMAKE_BINARY_DIR</code></b></a>: The path to the top level of the build tree.<br>
<p>This is the full path to the top level of the current CMake build tree. For an in-source build, this would be the same as CMAKE_SOURCE_DIR.
</li>
<li>
<a name="variable:CMAKE_BUILD_TOOL"><b><code>CMAKE_BUILD_TOOL</code></b></a>: Tool used for the actual build process.<br>
<p>This variable is set to the program that will be needed to build the output of CMake. If the generator selected was Visual Studio 6, the CMAKE_MAKE_PROGRAM will be set to msdev, for Unix makefiles it will be set to make or gmake, and for Visual Studio 7 it set to devenv. For Nmake Makefiles the value is nmake. This can be useful for adding special flags and commands based on the final build environment.
</li>
<li>
<a name="variable:CMAKE_CACHEFILE_DIR"><b><code>CMAKE_CACHEFILE_DIR</code></b></a>: The directory with the CMakeCache.txt file.<br>
<p>This is the full path to the directory that has the CMakeCache.txt file in it. This is the same as CMAKE_BINARY_DIR.
</li>
<li>
<a name="variable:CMAKE_CACHE_MAJOR_VERSION"><b><code>CMAKE_CACHE_MAJOR_VERSION</code></b></a>: Major version of CMake used to create the CMakeCache.txt file<br>
<p>This is stores the major version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.
</li>
<li>
<a name="variable:CMAKE_CACHE_MINOR_VERSION"><b><code>CMAKE_CACHE_MINOR_VERSION</code></b></a>: Minor version of CMake used to create the CMakeCache.txt file<br>
<p>This is stores the minor version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.
</li>
<li>
<a name="variable:CMAKE_CACHE_PATCH_VERSION"><b><code>CMAKE_CACHE_PATCH_VERSION</code></b></a>: Patch version of CMake used to create the CMakeCache.txt file<br>
<p>This is stores the patch version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.
</li>
<li>
<a name="variable:CMAKE_CFG_INTDIR"><b><code>CMAKE_CFG_INTDIR</code></b></a>: Build-time reference to per-configuration output subdirectory.<br>
<p>For native build systems supporting multiple configurations in the build tree (such as Visual Studio and Xcode), the value is a reference to a build-time variable specifying the name of the per-configuration output subdirectory. On Makefile generators this evaluates to "." because there is only one configuration in a build tree. Example values:<br><pre> $(IntDir) = Visual Studio 6<br> $(OutDir) = Visual Studio 7, 8, 9<br> $(Configuration) = Visual Studio 10<br> $(CONFIGURATION) = Xcode<br> . = Make-based tools<br></pre>
<p>Since these values are evaluated by the native build system, this variable is suitable only for use in command lines that will be evaluated at build time. Example of intended usage:<br><pre> add_executable(mytool mytool.c)<br> add_custom_command(<br> OUTPUT out.txt<br> COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool<br> ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt<br> DEPENDS mytool in.txt<br> )<br> add_custom_target(drive ALL DEPENDS out.txt)<br></pre>
<p>Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose but has been left for compatibility with existing projects. Instead add_custom_command() recognizes executable target names in its COMMAND option, so "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool" can be replaced by just "mytool".<br><p>This variable is read-only. Setting it is undefined behavior. In multi-configuration build systems the value of this variable is passed as the value of preprocessor symbol "CMAKE_INTDIR" to the compilation of all source files.
</li>
<li>
<a name="variable:CMAKE_COMMAND"><b><code>CMAKE_COMMAND</code></b></a>: The full path to the cmake executable.<br>
<p>This is the full path to the CMake executable cmake which is useful from custom commands that want to use the cmake -E option for portable system commands. (e.g. /usr/local/bin/cmake
</li>
<li>
<a name="variable:CMAKE_CROSSCOMPILING"><b><code>CMAKE_CROSSCOMPILING</code></b></a>: Is CMake currently cross compiling.<br>
<p>This variable will be set to true by CMake if CMake is cross compiling. Specifically if the build platform is different from the target platform.
</li>
<li>
<a name="variable:CMAKE_CTEST_COMMAND"><b><code>CMAKE_CTEST_COMMAND</code></b></a>: Full path to ctest command installed with cmake.<br>
<p>This is the full path to the CTest executable ctest which is useful from custom commands that want to use the cmake -E option for portable system commands.
</li>
<li>
<a name="variable:CMAKE_CURRENT_BINARY_DIR"><b><code>CMAKE_CURRENT_BINARY_DIR</code></b></a>: The path to the binary directory currently being processed.<br>
<p>This the full path to the build directory that is currently being processed by cmake. Each directory added by add_subdirectory will create a binary directory in the build tree, and as it is being processed this variable will be set. For in-source builds this is the current source directory being processed.
</li>
<li>
<a name="variable:CMAKE_CURRENT_LIST_FILE"><b><code>CMAKE_CURRENT_LIST_FILE</code></b></a>: Full path to the listfile currently being processed.<br>
<p>As CMake processes the listfiles in your project this variable will always be set to the one currently being processed. The value has dynamic scope. When CMake starts processing commands in a source file it sets this variable to the location of the file. When CMake finishes processing commands from the file it restores the previous value. Therefore the value of the variable inside a macro or function is the file invoking the bottom-most entry on the call stack, not the file containing the macro or function definition.<br><p>See also CMAKE_PARENT_LIST_FILE.
</li>
<li>
<a name="variable:CMAKE_CURRENT_LIST_LINE"><b><code>CMAKE_CURRENT_LIST_LINE</code></b></a>: The line number of the current file being processed.<br>
<p>This is the line number of the file currently being processed by cmake.
</li>
<li>
<a name="variable:CMAKE_CURRENT_SOURCE_DIR"><b><code>CMAKE_CURRENT_SOURCE_DIR</code></b></a>: The path to the source directory currently being processed.<br>
<p>This the full path to the source directory that is currently being processed by cmake.
</li>
<li>
<a name="variable:CMAKE_DL_LIBS"><b><code>CMAKE_DL_LIBS</code></b></a>: Name of library containing dlopen and dlcose.<br>
<p>The name of the library that has dlopen and dlclose in it, usually -ldl on most UNIX machines.
</li>
<li>
<a name="variable:CMAKE_EDIT_COMMAND"><b><code>CMAKE_EDIT_COMMAND</code></b></a>: Full path to cmake-gui or ccmake.<br>
<p>This is the full path to the CMake executable that can graphically edit the cache. For example, cmake-gui, ccmake, or cmake -i.
</li>
<li>
<a name="variable:CMAKE_EXECUTABLE_SUFFIX"><b><code>CMAKE_EXECUTABLE_SUFFIX</code></b></a>: The suffix for executables on this platform.<br>
<p>The suffix to use for the end of an executable if any, .exe on Windows.<br><p>CMAKE_EXECUTABLE_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES"><b><code>CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES</code></b></a>: Additional suffixes for shared libraries.<br>
<p>Extensions for shared libraries other than that specified by CMAKE_SHARED_LIBRARY_SUFFIX, if any. CMake uses this to recognize external shared library files during analysis of libraries linked by a target.
</li>
<li>
<a name="variable:CMAKE_GENERATOR"><b><code>CMAKE_GENERATOR</code></b></a>: The generator used to build the project.<br>
<p>The name of the generator that is being used to generate the build files. (e.g. "Unix Makefiles", "Visual Studio 6", etc.)
</li>
<li>
<a name="variable:CMAKE_HOME_DIRECTORY"><b><code>CMAKE_HOME_DIRECTORY</code></b></a>: Path to top of source tree.<br>
<p>This is the path to the top level of the source tree.
</li>
<li>
<a name="variable:CMAKE_IMPORT_LIBRARY_PREFIX"><b><code>CMAKE_IMPORT_LIBRARY_PREFIX</code></b></a>: The prefix for import libraries that you link to.<br>
<p>The prefix to use for the name of an import library if used on this platform.<br><p>CMAKE_IMPORT_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_IMPORT_LIBRARY_SUFFIX"><b><code>CMAKE_IMPORT_LIBRARY_SUFFIX</code></b></a>: The suffix for import libraries that you link to.<br>
<p>The suffix to use for the end of an import library if used on this platform.<br><p>CMAKE_IMPORT_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_LINK_LIBRARY_SUFFIX"><b><code>CMAKE_LINK_LIBRARY_SUFFIX</code></b></a>: The suffix for libraries that you link to.<br>
<p>The suffix to use for the end of a library, .lib on Windows.
</li>
<li>
<a name="variable:CMAKE_MAJOR_VERSION"><b><code>CMAKE_MAJOR_VERSION</code></b></a>: The Major version of cmake (i.e. the 2 in 2.X.X)<br>
<p>This specifies the major version of the CMake executable being run.
</li>
<li>
<a name="variable:CMAKE_MAKE_PROGRAM"><b><code>CMAKE_MAKE_PROGRAM</code></b></a>: See CMAKE_BUILD_TOOL.<br>
<p>This variable is around for backwards compatibility, see CMAKE_BUILD_TOOL.
</li>
<li>
<a name="variable:CMAKE_MINOR_VERSION"><b><code>CMAKE_MINOR_VERSION</code></b></a>: The Minor version of cmake (i.e. the 4 in X.4.X).<br>
<p>This specifies the minor version of the CMake executable being run.
</li>
<li>
<a name="variable:CMAKE_PARENT_LIST_FILE"><b><code>CMAKE_PARENT_LIST_FILE</code></b></a>: Full path to the parent listfile of the one currently being processed.<br>
<p>As CMake processes the listfiles in your project this variable will always be set to the listfile that included or somehow invoked the one currently being processed. See also CMAKE_CURRENT_LIST_FILE.
</li>
<li>
<a name="variable:CMAKE_PATCH_VERSION"><b><code>CMAKE_PATCH_VERSION</code></b></a>: The patch version of cmake (i.e. the 3 in X.X.3).<br>
<p>This specifies the patch version of the CMake executable being run.
</li>
<li>
<a name="variable:CMAKE_PROJECT_NAME"><b><code>CMAKE_PROJECT_NAME</code></b></a>: The name of the current project.<br>
<p>This specifies name of the current project from the closest inherited PROJECT command.
</li>
<li>
<a name="variable:CMAKE_RANLIB"><b><code>CMAKE_RANLIB</code></b></a>: Name of randomizing tool for static libraries.<br>
<p>This specifies name of the program that randomizes libraries on UNIX, not used on Windows, but may be present.
</li>
<li>
<a name="variable:CMAKE_ROOT"><b><code>CMAKE_ROOT</code></b></a>: Install directory for running cmake.<br>
<p>This is the install root for the running CMake and the Modules directory can be found here. This is commonly used in this format: ${CMAKE_ROOT}/Modules
</li>
<li>
<a name="variable:CMAKE_SHARED_LIBRARY_PREFIX"><b><code>CMAKE_SHARED_LIBRARY_PREFIX</code></b></a>: The prefix for shared libraries that you link to.<br>
<p>The prefix to use for the name of a shared library, lib on UNIX.<br><p>CMAKE_SHARED_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_SHARED_LIBRARY_SUFFIX"><b><code>CMAKE_SHARED_LIBRARY_SUFFIX</code></b></a>: The suffix for shared libraries that you link to.<br>
<p>The suffix to use for the end of a shared library, .dll on Windows.<br><p>CMAKE_SHARED_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_SHARED_MODULE_PREFIX"><b><code>CMAKE_SHARED_MODULE_PREFIX</code></b></a>: The prefix for loadable modules that you link to.<br>
<p>The prefix to use for the name of a loadable module on this platform.<br><p>CMAKE_SHARED_MODULE_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_SHARED_MODULE_SUFFIX"><b><code>CMAKE_SHARED_MODULE_SUFFIX</code></b></a>: The suffix for shared libraries that you link to.<br>
<p>The suffix to use for the end of a loadable module on this platform<br><p>CMAKE_SHARED_MODULE_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_SIZEOF_VOID_P"><b><code>CMAKE_SIZEOF_VOID_P</code></b></a>: Size of a void pointer.<br>
<p>This is set to the size of a pointer on the machine, and is determined by a try compile. If a 64 bit size is found, then the library search path is modified to look for 64 bit libraries first.
</li>
<li>
<a name="variable:CMAKE_SKIP_RPATH"><b><code>CMAKE_SKIP_RPATH</code></b></a>: If true, do not add run time path information.<br>
<p>If this is set to TRUE, then the rpath information is not added to compiled executables. The default is to add rpath information if the platform supports it.This allows for easy running from the build tree.
</li>
<li>
<a name="variable:CMAKE_SOURCE_DIR"><b><code>CMAKE_SOURCE_DIR</code></b></a>: The path to the top level of the source tree.<br>
<p>This is the full path to the top level of the current CMake source tree. For an in-source build, this would be the same as CMAKE_BINARY_DIR.
</li>
<li>
<a name="variable:CMAKE_STANDARD_LIBRARIES"><b><code>CMAKE_STANDARD_LIBRARIES</code></b></a>: Libraries linked into every executable and shared library.<br>
<p>This is the list of libraries that are linked into all executables and libraries.
</li>
<li>
<a name="variable:CMAKE_STATIC_LIBRARY_PREFIX"><b><code>CMAKE_STATIC_LIBRARY_PREFIX</code></b></a>: The prefix for static libraries that you link to.<br>
<p>The prefix to use for the name of a static library, lib on UNIX.<br><p>CMAKE_STATIC_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_STATIC_LIBRARY_SUFFIX"><b><code>CMAKE_STATIC_LIBRARY_SUFFIX</code></b></a>: The suffix for static libraries that you link to.<br>
<p>The suffix to use for the end of a static library, .lib on Windows.<br><p>CMAKE_STATIC_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_USING_VC_FREE_TOOLS"><b><code>CMAKE_USING_VC_FREE_TOOLS</code></b></a>: True if free visual studio tools being used.<br>
<p>This is set to true if the compiler is Visual Studio free tools.
</li>
<li>
<a name="variable:CMAKE_VERBOSE_MAKEFILE"><b><code>CMAKE_VERBOSE_MAKEFILE</code></b></a>: Create verbose makefiles if on.<br>
<p>This variable defaults to false. You can set this variable to true to make CMake produce verbose makefiles that show each command line as it is used.
</li>
<li>
<a name="variable:CMAKE_VERSION"><b><code>CMAKE_VERSION</code></b></a>: The full version of cmake in major.minor.patch format.<br>
<p>This specifies the full version of the CMake executable being run. This variable is defined by versions 2.6.3 and higher. See variables CMAKE_MAJOR_VERSION, CMAKE_MINOR_VERSION, and CMAKE_PATCH_VERSION for individual version components.
</li>
<li>
<a name="variable:PROJECT_BINARY_DIR"><b><code>PROJECT_BINARY_DIR</code></b></a>: Full path to build directory for project.<br>
<p>This is the binary directory of the most recent PROJECT command.
</li>
<li>
<a name="variable:PROJECT_NAME"><b><code>PROJECT_NAME</code></b></a>: Name of the project given to the project command.<br>
<p>This is the name given to the most recent PROJECT command.
</li>
<li>
<a name="variable:PROJECT_SOURCE_DIR"><b><code>PROJECT_SOURCE_DIR</code></b></a>: Top level source directory for the current project.<br>
<p>This is the source directory of the most recent PROJECT command.
</li>
<li>
<a name="variable:Projectname_BINARY_DIR"><b><code>[Project name]_BINARY_DIR</code></b></a>: Top level binary directory for the named project.<br>
<p>A variable is created with the name used in the PROJECT command, and is the binary directory for the project. This can be useful when SUBDIR is used to connect several projects.
</li>
<li>
<a name="variable:Projectname_SOURCE_DIR"><b><code>[Project name]_SOURCE_DIR</code></b></a>: Top level source directory for the named project.<br>
<p>A variable is created with the name used in the PROJECT command, and is the source directory for the project. This can be useful when add_subdirectory is used to connect several projects.
</li>
</ul>
<h2><a name="section_Variables That Change Behavior"/>Variables That Change Behavior</h2>
<ul>
<li><a href="#variable:BUILD_SHARED_LIBS"><b><code>BUILD_SHARED_LIBS</code></b></a></li> <li><a href="#variable:CMAKE_BACKWARDS_COMPATIBILITY"><b><code>CMAKE_BACKWARDS_COMPATIBILITY</code></b></a></li> <li><a href="#variable:CMAKE_BUILD_TYPE"><b><code>CMAKE_BUILD_TYPE</code></b></a></li> <li><a href="#variable:CMAKE_COLOR_MAKEFILE"><b><code>CMAKE_COLOR_MAKEFILE</code></b></a></li> <li><a href="#variable:CMAKE_CONFIGURATION_TYPES"><b><code>CMAKE_CONFIGURATION_TYPES</code></b></a></li> <li><a href="#variable:CMAKE_FIND_LIBRARY_PREFIXES"><b><code>CMAKE_FIND_LIBRARY_PREFIXES</code></b></a></li> <li><a href="#variable:CMAKE_FIND_LIBRARY_SUFFIXES"><b><code>CMAKE_FIND_LIBRARY_SUFFIXES</code></b></a></li> <li><a href="#variable:CMAKE_INCLUDE_PATH"><b><code>CMAKE_INCLUDE_PATH</code></b></a></li> <li><a href="#variable:CMAKE_INSTALL_PREFIX"><b><code>CMAKE_INSTALL_PREFIX</code></b></a></li> <li><a href="#variable:CMAKE_LIBRARY_PATH"><b><code>CMAKE_LIBRARY_PATH</code></b></a></li> <li><a href="#variable:CMAKE_MFC_FLAG"><b><code>CMAKE_MFC_FLAG</code></b></a></li> <li><a href="#variable:CMAKE_MODULE_PATH"><b><code>CMAKE_MODULE_PATH</code></b></a></li> <li><a href="#variable:CMAKE_NOT_USING_CONFIG_FLAGS"><b><code>CMAKE_NOT_USING_CONFIG_FLAGS</code></b></a></li> <li><a href="#variable:CMAKE_PREFIX_PATH"><b><code>CMAKE_PREFIX_PATH</code></b></a></li> <li><a href="#variable:CMAKE_PROGRAM_PATH"><b><code>CMAKE_PROGRAM_PATH</code></b></a></li> <li><a href="#variable:CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"><b><code>CMAKE_SKIP_INSTALL_ALL_DEPENDENCY</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_INCLUDE_PATH"><b><code>CMAKE_SYSTEM_INCLUDE_PATH</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_LIBRARY_PATH"><b><code>CMAKE_SYSTEM_LIBRARY_PATH</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_PREFIX_PATH"><b><code>CMAKE_SYSTEM_PREFIX_PATH</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_PROGRAM_PATH"><b><code>CMAKE_SYSTEM_PROGRAM_PATH</code></b></a></li> <li><a href="#variable:CMAKE_USER_MAKE_RULES_OVERRIDE"><b><code>CMAKE_USER_MAKE_RULES_OVERRIDE</code></b></a></li></ul>
<ul>
<li>
<a name="variable:BUILD_SHARED_LIBS"><b><code>BUILD_SHARED_LIBS</code></b></a>: Global flag to cause add_library to create shared libraries if on.<br>
<p>If present and true, this will cause all libraries to be built shared unless the library was explicitly added as a static library. This variable is often added to projects as an OPTION so that each user of a project can decide if they want to build the project using shared or static libraries.
</li>
<li>
<a name="variable:CMAKE_BACKWARDS_COMPATIBILITY"><b><code>CMAKE_BACKWARDS_COMPATIBILITY</code></b></a>: Version of cmake required to build project<br>
<p>From the point of view of backwards compatibility, this specifies what version of CMake should be supported. By default this value is the version number of CMake that you are running. You can set this to an older version of CMake to support deprecated commands of CMake in projects that were written to use older versions of CMake. This can be set by the user or set at the beginning of a CMakeLists file.
</li>
<li>
<a name="variable:CMAKE_BUILD_TYPE"><b><code>CMAKE_BUILD_TYPE</code></b></a>: Specifies the build type for make based generators.<br>
<p>This specifies what build type will be built in this tree. Possible values are empty, Debug, Release, RelWithDebInfo and MinSizeRel. This variable is only supported for make based generators. If this variable is supported, then CMake will also provide initial values for the variables with the name CMAKE_C_FLAGS_[Debug|Release|RelWithDebInfo|MinSizeRel]. For example, if CMAKE_BUILD_TYPE is Debug, then CMAKE_C_FLAGS_DEBUG will be added to the CMAKE_C_FLAGS.
</li>
<li>
<a name="variable:CMAKE_COLOR_MAKEFILE"><b><code>CMAKE_COLOR_MAKEFILE</code></b></a>: Enables color output when using the Makefile generator.<br>
<p>When enabled, the generated Makefiles will produce colored output. Default is ON.
</li>
<li>
<a name="variable:CMAKE_CONFIGURATION_TYPES"><b><code>CMAKE_CONFIGURATION_TYPES</code></b></a>: Specifies the available build types.<br>
<p>This specifies what build types will be available such as Debug, Release, RelWithDebInfo etc. This has reasonable defaults on most platforms. But can be extended to provide other build types. See also CMAKE_BUILD_TYPE.
</li>
<li>
<a name="variable:CMAKE_FIND_LIBRARY_PREFIXES"><b><code>CMAKE_FIND_LIBRARY_PREFIXES</code></b></a>: Prefixes to prepend when looking for libraries.<br>
<p>This specifies what prefixes to add to library names when the find_library command looks for libraries. On UNIX systems this is typically lib, meaning that when trying to find the foo library it will look for libfoo.
</li>
<li>
<a name="variable:CMAKE_FIND_LIBRARY_SUFFIXES"><b><code>CMAKE_FIND_LIBRARY_SUFFIXES</code></b></a>: Suffixes to append when looking for libraries.<br>
<p>This specifies what suffixes to add to library names when the find_library command looks for libraries. On Windows systems this is typically .lib and .dll, meaning that when trying to find the foo library it will look for foo.dll etc.
</li>
<li>
<a name="variable:CMAKE_INCLUDE_PATH"><b><code>CMAKE_INCLUDE_PATH</code></b></a>: Path used for searching by FIND_FILE() and FIND_PATH().<br>
<p>Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_INSTALL_PREFIX"><b><code>CMAKE_INSTALL_PREFIX</code></b></a>: Install directory used by install.<br>
<p>If "make install" is invoked or INSTALL is built, this directory is pre-pended onto all install directories. This variable defaults to /usr/local on UNIX and c:/Program Files on Windows.
</li>
<li>
<a name="variable:CMAKE_LIBRARY_PATH"><b><code>CMAKE_LIBRARY_PATH</code></b></a>: Path used for searching by FIND_LIBRARY().<br>
<p>Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_MFC_FLAG"><b><code>CMAKE_MFC_FLAG</code></b></a>: Tell cmake to use MFC for an executable or dll.<br>
<p>This can be set in a CMakeLists.txt file and will enable MFC in the application. It should be set to 1 for static the static MFC library, and 2 for the shared MFC library. This is used in visual studio 6 and 7 project files. The CMakeSetup dialog used MFC and the CMakeLists.txt looks like this:<br><p>add_definitions(-D_AFXDLL)<br><p>set(CMAKE_MFC_FLAG 2)<br><p>add_executable(CMakeSetup WIN32 ${SRCS})<br>
</li>
<li>
<a name="variable:CMAKE_MODULE_PATH"><b><code>CMAKE_MODULE_PATH</code></b></a>: Path to look for cmake modules to load.<br>
<p>Specifies a path to override the default search path for CMake modules. For example include commands will look in this path first for modules to include.
</li>
<li>
<a name="variable:CMAKE_NOT_USING_CONFIG_FLAGS"><b><code>CMAKE_NOT_USING_CONFIG_FLAGS</code></b></a>: Skip _BUILD_TYPE flags if true.<br>
<p>This is an internal flag used by the generators in CMake to tell CMake to skip the _BUILD_TYPE flags.
</li>
<li>
<a name="variable:CMAKE_PREFIX_PATH"><b><code>CMAKE_PREFIX_PATH</code></b></a>: Path used for searching by FIND_XXX(), with appropriate suffixes added.<br>
<p>Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.
</li>
<li>
<a name="variable:CMAKE_PROGRAM_PATH"><b><code>CMAKE_PROGRAM_PATH</code></b></a>: Path used for searching by FIND_PROGRAM().<br>
<p>Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PROGRAM_PATH, CMAKE_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"><b><code>CMAKE_SKIP_INSTALL_ALL_DEPENDENCY</code></b></a>: Don't make the install target depend on the all target.<br>
<p>By default, the "install" target depends on the "all" target. This has the effect, that when "make install" is invoked or INSTALL is built, first the "all" target is built, then the installation starts. If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency is not created, so the installation process will start immediately, independent from whether the project has been completely built or not.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_INCLUDE_PATH"><b><code>CMAKE_SYSTEM_INCLUDE_PATH</code></b></a>: Path used for searching by FIND_FILE() and FIND_PATH().<br>
<p>Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_INCLUDE_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_LIBRARY_PATH"><b><code>CMAKE_SYSTEM_LIBRARY_PATH</code></b></a>: Path used for searching by FIND_LIBRARY().<br>
<p>Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_SYSTEM_LIBRARY_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_PREFIX_PATH"><b><code>CMAKE_SYSTEM_PREFIX_PATH</code></b></a>: Path used for searching by FIND_XXX(), with appropriate suffixes added.<br>
<p>Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default this contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_PREFIX_PATH for this. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_SYSTEM_PROGRAM_PATH.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_PROGRAM_PATH"><b><code>CMAKE_SYSTEM_PROGRAM_PATH</code></b></a>: Path used for searching by FIND_PROGRAM().<br>
<p>Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_PROGRAM_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.
</li>
<li>
<a name="variable:CMAKE_USER_MAKE_RULES_OVERRIDE"><b><code>CMAKE_USER_MAKE_RULES_OVERRIDE</code></b></a>: Specify a file that can change the build rule variables.<br>
<p>If this variable is set, it should to point to a CMakeLists.txt file that will be read in by CMake after all the system settings have been set, but before they have been used. This would allow you to override any variables that need to be changed for some special project.
</li>
</ul>
<h2><a name="section_Variables That Describe the System"/>Variables That Describe the System</h2>
<ul>
<li><a href="#variable:APPLE"><b><code>APPLE</code></b></a></li> <li><a href="#variable:BORLAND"><b><code>BORLAND</code></b></a></li> <li><a href="#variable:CMAKE_CL_64"><b><code>CMAKE_CL_64</code></b></a></li> <li><a href="#variable:CMAKE_COMPILER_2005"><b><code>CMAKE_COMPILER_2005</code></b></a></li> <li><a href="#variable:CMAKE_HOST_APPLE"><b><code>CMAKE_HOST_APPLE</code></b></a></li> <li><a href="#variable:CMAKE_HOST_SYSTEM"><b><code>CMAKE_HOST_SYSTEM</code></b></a></li> <li><a href="#variable:CMAKE_HOST_SYSTEM_NAME"><b><code>CMAKE_HOST_SYSTEM_NAME</code></b></a></li> <li><a href="#variable:CMAKE_HOST_SYSTEM_PROCESSOR"><b><code>CMAKE_HOST_SYSTEM_PROCESSOR</code></b></a></li> <li><a href="#variable:CMAKE_HOST_SYSTEM_VERSION"><b><code>CMAKE_HOST_SYSTEM_VERSION</code></b></a></li> <li><a href="#variable:CMAKE_HOST_UNIX"><b><code>CMAKE_HOST_UNIX</code></b></a></li> <li><a href="#variable:CMAKE_HOST_WIN32"><b><code>CMAKE_HOST_WIN32</code></b></a></li> <li><a href="#variable:CMAKE_OBJECT_PATH_MAX"><b><code>CMAKE_OBJECT_PATH_MAX</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM"><b><code>CMAKE_SYSTEM</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_NAME"><b><code>CMAKE_SYSTEM_NAME</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_PROCESSOR"><b><code>CMAKE_SYSTEM_PROCESSOR</code></b></a></li> <li><a href="#variable:CMAKE_SYSTEM_VERSION"><b><code>CMAKE_SYSTEM_VERSION</code></b></a></li> <li><a href="#variable:CYGWIN"><b><code>CYGWIN</code></b></a></li> <li><a href="#variable:MSVC"><b><code>MSVC</code></b></a></li> <li><a href="#variable:MSVC80"><b><code>MSVC80</code></b></a></li> <li><a href="#variable:MSVC_IDE"><b><code>MSVC_IDE</code></b></a></li> <li><a href="#variable:MSVC_VERSION"><b><code>MSVC_VERSION</code></b></a></li> <li><a href="#variable:UNIX"><b><code>UNIX</code></b></a></li> <li><a href="#variable:WIN32"><b><code>WIN32</code></b></a></li> <li><a href="#variable:XCODE_VERSION"><b><code>XCODE_VERSION</code></b></a></li></ul>
<ul>
<li>
<a name="variable:APPLE"><b><code>APPLE</code></b></a>: True if running on Mac OSX.<br>
<p>Set to true on Mac OSX.
</li>
<li>
<a name="variable:BORLAND"><b><code>BORLAND</code></b></a>: True of the borland compiler is being used.<br>
<p>This is set to true if the Borland compiler is being used.
</li>
<li>
<a name="variable:CMAKE_CL_64"><b><code>CMAKE_CL_64</code></b></a>: Using the 64 bit compiler from Microsoft<br>
<p>Set to true when using the 64 bit cl compiler from Microsoft.
</li>
<li>
<a name="variable:CMAKE_COMPILER_2005"><b><code>CMAKE_COMPILER_2005</code></b></a>: Using the Visual Studio 2005 compiler from Microsoft<br>
<p>Set to true when using the Visual Studio 2005 compiler from Microsoft.
</li>
<li>
<a name="variable:CMAKE_HOST_APPLE"><b><code>CMAKE_HOST_APPLE</code></b></a>: True for Apple OSXoperating systems.<br>
<p>Set to true when the host system is Apple OSX.
</li>
<li>
<a name="variable:CMAKE_HOST_SYSTEM"><b><code>CMAKE_HOST_SYSTEM</code></b></a>: Name of system cmake is being run on.<br>
<p>The same as CMAKE_SYSTEM but for the host system instead of the target system when cross compiling.
</li>
<li>
<a name="variable:CMAKE_HOST_SYSTEM_NAME"><b><code>CMAKE_HOST_SYSTEM_NAME</code></b></a>: Name of the OS CMake is running on.<br>
<p>The same as CMAKE_SYSTEM_NAME but for the host system instead of the target system when cross compiling.
</li>
<li>
<a name="variable:CMAKE_HOST_SYSTEM_PROCESSOR"><b><code>CMAKE_HOST_SYSTEM_PROCESSOR</code></b></a>: The name of the CPU CMake is running on.<br>
<p>The same as CMAKE_SYSTEM_PROCESSOR but for the host system instead of the target system when cross compiling.
</li>
<li>
<a name="variable:CMAKE_HOST_SYSTEM_VERSION"><b><code>CMAKE_HOST_SYSTEM_VERSION</code></b></a>: OS version CMake is running on.<br>
<p>The same as CMAKE_SYSTEM_VERSION but for the host system instead of the target system when cross compiling.
</li>
<li>
<a name="variable:CMAKE_HOST_UNIX"><b><code>CMAKE_HOST_UNIX</code></b></a>: True for UNIX and UNIX like operating systems.<br>
<p>Set to true when the host system is UNIX or UNIX like (i.e. APPLE and CYGWIN).
</li>
<li>
<a name="variable:CMAKE_HOST_WIN32"><b><code>CMAKE_HOST_WIN32</code></b></a>: True on windows systems, including win64.<br>
<p>Set to true when the host system is Windows and on cygwin.
</li>
<li>
<a name="variable:CMAKE_OBJECT_PATH_MAX"><b><code>CMAKE_OBJECT_PATH_MAX</code></b></a>: Maximum object file full-path length allowed by native build tools.<br>
<p>CMake computes for every source file an object file name that is unique to the source file and deterministic with respect to the full path to the source file. This allows multiple source files in a target to share the same name if they lie in different directories without rebuilding when one is added or removed. However, it can produce long full paths in a few cases, so CMake shortens the path using a hashing scheme when the full path to an object file exceeds a limit. CMake has a built-in limit for each platform that is sufficient for common tools, but some native tools may have a lower limit. This variable may be set to specify the limit explicitly. The value must be an integer no less than 128.
</li>
<li>
<a name="variable:CMAKE_SYSTEM"><b><code>CMAKE_SYSTEM</code></b></a>: Name of system cmake is compiling for.<br>
<p>This variable is the composite of CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_VERSION, like this ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. If CMAKE_SYSTEM_VERSION is not set, then CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_NAME"><b><code>CMAKE_SYSTEM_NAME</code></b></a>: Name of the OS CMake is building for.<br>
<p>This is the name of the operating system on which CMake is targeting. On systems that have the uname command, this variable is set to the output of uname -s. Linux, Windows, and Darwin for Mac OSX are the values found on the big three operating systems.
</li>
<li>
<a name="variable:CMAKE_SYSTEM_PROCESSOR"><b><code>CMAKE_SYSTEM_PROCESSOR</code></b></a>: The name of the CPU CMake is building for.<br>
<p>On systems that support uname, this variable is set to the output of uname -p, on windows it is set to the value of the environment variable PROCESSOR_ARCHITECTURE
</li>
<li>
<a name="variable:CMAKE_SYSTEM_VERSION"><b><code>CMAKE_SYSTEM_VERSION</code></b></a>: OS version CMake is building for.<br>
<p>A numeric version string for the system, on systems that support uname, this variable is set to the output of uname -r. On other systems this is set to major-minor version numbers.
</li>
<li>
<a name="variable:CYGWIN"><b><code>CYGWIN</code></b></a>: True for cygwin.<br>
<p>Set to true when using CYGWIN.
</li>
<li>
<a name="variable:MSVC"><b><code>MSVC</code></b></a>: True when using Microsoft Visual C<br>
<p>Set to true when the compiler is some version of Microsoft Visual C.
</li>
<li>
<a name="variable:MSVC80"><b><code>MSVC80</code></b></a>: True when using Microsoft Visual C 8.0<br>
<p>Set to true when the compiler is version 8.0 of Microsoft Visual C.
</li>
<li>
<a name="variable:MSVC_IDE"><b><code>MSVC_IDE</code></b></a>: True when using the Microsoft Visual C IDE<br>
<p>Set to true when the target platform is the Microsoft Visual C IDE, as opposed to the command line compiler.
</li>
<li>
<a name="variable:MSVC_VERSION"><b><code>MSVC_VERSION</code></b></a>: The version of Microsoft Visual C/C++ being used if any.<br>
<p>The version of Microsoft Visual C/C++ being used if any. For example 1300 is MSVC 6.0.
</li>
<li>
<a name="variable:UNIX"><b><code>UNIX</code></b></a>: True for UNIX and UNIX like operating systems.<br>
<p>Set to true when the target system is UNIX or UNIX like (i.e. APPLE and CYGWIN).
</li>
<li>
<a name="variable:WIN32"><b><code>WIN32</code></b></a>: True on windows systems, including win64.<br>
<p>Set to true when the target system is Windows and on cygwin.
</li>
<li>
<a name="variable:XCODE_VERSION"><b><code>XCODE_VERSION</code></b></a>: Version of Xcode (Xcode generator only).<br>
<p>Under the Xcode generator, this is the version of Xcode as specified in "Xcode.app/Contents/version.plist" (such as "3.1.2").
</li>
</ul>
<h2><a name="section_Variables that Control the Build"/>Variables that Control the Build</h2>
<ul>
<li><a href="#variable:CMAKE_CONFIG_POSTFIX"><b><code>CMAKE_&lt;CONFIG&gt;_POSTFIX</code></b></a></li> <li><a href="#variable:CMAKE_ARCHIVE_OUTPUT_DIRECTORY"><b><code>CMAKE_ARCHIVE_OUTPUT_DIRECTORY</code></b></a></li> <li><a href="#variable:CMAKE_BUILD_WITH_INSTALL_RPATH"><b><code>CMAKE_BUILD_WITH_INSTALL_RPATH</code></b></a></li> <li><a href="#variable:CMAKE_DEBUG_POSTFIX"><b><code>CMAKE_DEBUG_POSTFIX</code></b></a></li> <li><a href="#variable:CMAKE_EXE_LINKER_FLAGS"><b><code>CMAKE_EXE_LINKER_FLAGS</code></b></a></li> <li><a href="#variable:CMAKE_EXE_LINKER_FLAGS_CMAKE_BUILD_TYPE"><b><code>CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]</code></b></a></li> <li><a href="#variable:CMAKE_Fortran_MODULE_DIRECTORY"><b><code>CMAKE_Fortran_MODULE_DIRECTORY</code></b></a></li> <li><a href="#variable:CMAKE_INCLUDE_CURRENT_DIR"><b><code>CMAKE_INCLUDE_CURRENT_DIR</code></b></a></li> <li><a href="#variable:CMAKE_INSTALL_NAME_DIR"><b><code>CMAKE_INSTALL_NAME_DIR</code></b></a></li> <li><a href="#variable:CMAKE_INSTALL_RPATH"><b><code>CMAKE_INSTALL_RPATH</code></b></a></li> <li><a href="#variable:CMAKE_INSTALL_RPATH_USE_LINK_PATH"><b><code>CMAKE_INSTALL_RPATH_USE_LINK_PATH</code></b></a></li> <li><a href="#variable:CMAKE_LIBRARY_OUTPUT_DIRECTORY"><b><code>CMAKE_LIBRARY_OUTPUT_DIRECTORY</code></b></a></li> <li><a href="#variable:CMAKE_LIBRARY_PATH_FLAG"><b><code>CMAKE_LIBRARY_PATH_FLAG</code></b></a></li> <li><a href="#variable:CMAKE_LINK_DEF_FILE_FLAG"><b><code>CMAKE_LINK_DEF_FILE_FLAG </code></b></a></li> <li><a href="#variable:CMAKE_LINK_LIBRARY_FILE_FLAG"><b><code>CMAKE_LINK_LIBRARY_FILE_FLAG</code></b></a></li> <li><a href="#variable:CMAKE_LINK_LIBRARY_FLAG"><b><code>CMAKE_LINK_LIBRARY_FLAG</code></b></a></li> <li><a href="#variable:CMAKE_NO_BUILTIN_CHRPATH"><b><code>CMAKE_NO_BUILTIN_CHRPATH</code></b></a></li> <li><a href="#variable:CMAKE_RUNTIME_OUTPUT_DIRECTORY"><b><code>CMAKE_RUNTIME_OUTPUT_DIRECTORY</code></b></a></li> <li><a href="#variable:CMAKE_SKIP_BUILD_RPATH"><b><code>CMAKE_SKIP_BUILD_RPATH</code></b></a></li> <li><a href="#variable:CMAKE_USE_RELATIVE_PATHS"><b><code>CMAKE_USE_RELATIVE_PATHS</code></b></a></li> <li><a href="#variable:EXECUTABLE_OUTPUT_PATH"><b><code>EXECUTABLE_OUTPUT_PATH</code></b></a></li> <li><a href="#variable:LIBRARY_OUTPUT_PATH"><b><code>LIBRARY_OUTPUT_PATH</code></b></a></li></ul>
<ul>
<li>
<a name="variable:CMAKE_CONFIG_POSTFIX"><b><code>CMAKE_&lt;CONFIG&gt;_POSTFIX</code></b></a>: Default filename postfix for libraries under configuration &lt;CONFIG&gt;.<br>
<p>When a non-executable target is created its &lt;CONFIG&gt;_POSTFIX target property is initialized with the value of this variable if it is set.
</li>
<li>
<a name="variable:CMAKE_ARCHIVE_OUTPUT_DIRECTORY"><b><code>CMAKE_ARCHIVE_OUTPUT_DIRECTORY</code></b></a>: Where to put all the ARCHIVE targets when built.<br>
<p>This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
</li>
<li>
<a name="variable:CMAKE_BUILD_WITH_INSTALL_RPATH"><b><code>CMAKE_BUILD_WITH_INSTALL_RPATH</code></b></a>: Use the install path for the RPATH<br>
<p>Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always built with the install path for the RPATH and does not need to be relinked when installed.
</li>
<li>
<a name="variable:CMAKE_DEBUG_POSTFIX"><b><code>CMAKE_DEBUG_POSTFIX</code></b></a>: See variable CMAKE_&lt;CONFIG&gt;_POSTFIX.<br>
<p>This variable is a special case of the more-general CMAKE_&lt;CONFIG&gt;_POSTFIX variable for the DEBUG configuration.
</li>
<li>
<a name="variable:CMAKE_EXE_LINKER_FLAGS"><b><code>CMAKE_EXE_LINKER_FLAGS</code></b></a>: Linker flags used to create executables.<br>
<p>Flags used by the linker when creating an executable.
</li>
<li>
<a name="variable:CMAKE_EXE_LINKER_FLAGS_CMAKE_BUILD_TYPE"><b><code>CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]</code></b></a>: Flag used when linking an executable.<br>
<p>Same as CMAKE_C_FLAGS_* but used by the linker when creating executables.
</li>
<li>
<a name="variable:CMAKE_Fortran_MODULE_DIRECTORY"><b><code>CMAKE_Fortran_MODULE_DIRECTORY</code></b></a>: Fortran module output directory.<br>
<p>This variable is used to initialize the Fortran_MODULE_DIRECTORY property on all the targets. See that target property for additional information.
</li>
<li>
<a name="variable:CMAKE_INCLUDE_CURRENT_DIR"><b><code>CMAKE_INCLUDE_CURRENT_DIR</code></b></a>: Automatically add the current source- and build directories to the include path.<br>
<p>If this variable is enabled, CMake automatically adds in each directory ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to the include path for this directory. These additional include directories do not propagate down to subdirectories. This is useful mainly for out-of-source builds, where files generated into the build tree are included by files located in the source tree.<br><p>By default CMAKE_INCLUDE_CURRENT_DIR is OFF.
</li>
<li>
<a name="variable:CMAKE_INSTALL_NAME_DIR"><b><code>CMAKE_INSTALL_NAME_DIR</code></b></a>: Mac OSX directory name for installed targets.<br>
<p>CMAKE_INSTALL_NAME_DIR is used to initialize the INSTALL_NAME_DIR property on all targets. See that target property for more information.
</li>
<li>
<a name="variable:CMAKE_INSTALL_RPATH"><b><code>CMAKE_INSTALL_RPATH</code></b></a>: The rpath to use for installed targets.<br>
<p>A semicolon-separated list specifying the rpath to use in installed targets (for platforms that support it). This is used to initialize the target property INSTALL_RPATH for all targets.
</li>
<li>
<a name="variable:CMAKE_INSTALL_RPATH_USE_LINK_PATH"><b><code>CMAKE_INSTALL_RPATH_USE_LINK_PATH</code></b></a>: Add paths to linker search and installed rpath.<br>
<p>CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will append directories in the linker search path and outside the project to the INSTALL_RPATH. This is used to initialize the target property INSTALL_RPATH_USE_LINK_PATH for all targets.
</li>
<li>
<a name="variable:CMAKE_LIBRARY_OUTPUT_DIRECTORY"><b><code>CMAKE_LIBRARY_OUTPUT_DIRECTORY</code></b></a>: Where to put all the LIBRARY targets when built.<br>
<p>This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
</li>
<li>
<a name="variable:CMAKE_LIBRARY_PATH_FLAG"><b><code>CMAKE_LIBRARY_PATH_FLAG</code></b></a>: The flag used to add a library search path to a compiler.<br>
<p>The flag used to specify a library directory to the compiler. On most compilers this is "-L".
</li>
<li>
<a name="variable:CMAKE_LINK_DEF_FILE_FLAG"><b><code>CMAKE_LINK_DEF_FILE_FLAG </code></b></a>: Linker flag used to specify a .def file for dll creation.<br>
<p>The flag used to add a .def file when creating a dll on Windows, this is only defined on Windows.
</li>
<li>
<a name="variable:CMAKE_LINK_LIBRARY_FILE_FLAG"><b><code>CMAKE_LINK_LIBRARY_FILE_FLAG</code></b></a>: Flag used to link a library specified by a path to its file.<br>
<p>The flag used before a library file path is given to the linker. This is needed only on very few platforms.
</li>
<li>
<a name="variable:CMAKE_LINK_LIBRARY_FLAG"><b><code>CMAKE_LINK_LIBRARY_FLAG</code></b></a>: Flag used to link a library into an executable.<br>
<p>The flag used to specify a library to link to an executable. On most compilers this is "-l".
</li>
<li>
<a name="variable:CMAKE_NO_BUILTIN_CHRPATH"><b><code>CMAKE_NO_BUILTIN_CHRPATH</code></b></a>: Do not use the builtin ELF editor to fix RPATHs on installation.<br>
<p>When an ELF binary needs to have a different RPATH after installation than it does in the build tree, CMake uses a builtin editor to change the RPATH in the installed copy. If this variable is set to true then CMake will relink the binary before installation instead of using its builtin editor.
</li>
<li>
<a name="variable:CMAKE_RUNTIME_OUTPUT_DIRECTORY"><b><code>CMAKE_RUNTIME_OUTPUT_DIRECTORY</code></b></a>: Where to put all the RUNTIME targets when built.<br>
<p>This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY property on all the targets. See that target property for additional information.
</li>
<li>
<a name="variable:CMAKE_SKIP_BUILD_RPATH"><b><code>CMAKE_SKIP_BUILD_RPATH</code></b></a>: Do not include RPATHs in the build tree.<br>
<p>Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always built with no RPATH.
</li>
<li>
<a name="variable:CMAKE_USE_RELATIVE_PATHS"><b><code>CMAKE_USE_RELATIVE_PATHS</code></b></a>: Use relative paths (May not work!).<br>
<p>If this is set to TRUE, then the CMake will use relative paths between the source and binary tree. This option does not work for more complicated projects, and relative paths are used when possible. In general, it is not possible to move CMake generated makefiles to a different location regardless of the value of this variable.
</li>
<li>
<a name="variable:EXECUTABLE_OUTPUT_PATH"><b><code>EXECUTABLE_OUTPUT_PATH</code></b></a>: Old executable location variable.<br>
<p>The target property RUNTIME_OUTPUT_DIRECTORY supercedes this variable for a target if it is set. Executable targets are otherwise placed in this directory.
</li>
<li>
<a name="variable:LIBRARY_OUTPUT_PATH"><b><code>LIBRARY_OUTPUT_PATH</code></b></a>: Old library location variable.<br>
<p>The target properties ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY supercede this variable for a target if they are set. Library targets are otherwise placed in this directory.
</li>
</ul>
<h2><a name="section_Variables for Languages"/>Variables for Languages</h2>
<ul>
<li><a href="#variable:CMAKE_LANG_ARCHIVE_APPEND"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND</code></b></a></li> <li><a href="#variable:CMAKE_LANG_ARCHIVE_CREATE"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE</code></b></a></li> <li><a href="#variable:CMAKE_LANG_ARCHIVE_FINISH"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH</code></b></a></li> <li><a href="#variable:CMAKE_LANG_COMPILER"><b><code>CMAKE_&lt;LANG&gt;_COMPILER</code></b></a></li> <li><a href="#variable:CMAKE_LANG_COMPILER_ABI"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_ABI</code></b></a></li> <li><a href="#variable:CMAKE_LANG_COMPILER_ID"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_ID</code></b></a></li> <li><a href="#variable:CMAKE_LANG_COMPILER_LOADED"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_LOADED</code></b></a></li> <li><a href="#variable:CMAKE_LANG_COMPILE_OBJECT"><b><code>CMAKE_&lt;LANG&gt;_COMPILE_OBJECT</code></b></a></li> <li><a href="#variable:CMAKE_LANG_CREATE_SHARED_LIBRARY"><b><code>CMAKE_&lt;LANG&gt;_CREATE_SHARED_LIBRARY</code></b></a></li> <li><a href="#variable:CMAKE_LANG_CREATE_SHARED_MODULE"><b><code>CMAKE_&lt;LANG&gt;_CREATE_SHARED_MODULE</code></b></a></li> <li><a href="#variable:CMAKE_LANG_CREATE_STATIC_LIBRARY"><b><code>CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY</code></b></a></li> <li><a href="#variable:CMAKE_LANG_FLAGS_DEBUG"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_DEBUG</code></b></a></li> <li><a href="#variable:CMAKE_LANG_FLAGS_MINSIZEREL"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_MINSIZEREL</code></b></a></li> <li><a href="#variable:CMAKE_LANG_FLAGS_RELEASE"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_RELEASE</code></b></a></li> <li><a href="#variable:CMAKE_LANG_FLAGS_RELWITHDEBINFO"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_RELWITHDEBINFO</code></b></a></li> <li><a href="#variable:CMAKE_LANG_IGNORE_EXTENSIONS"><b><code>CMAKE_&lt;LANG&gt;_IGNORE_EXTENSIONS</code></b></a></li> <li><a href="#variable:CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_INCLUDE_DIRECTORIES</code></b></a></li> <li><a href="#variable:CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_DIRECTORIES</code></b></a></li> <li><a href="#variable:CMAKE_LANG_IMPLICIT_LINK_LIBRARIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_LIBRARIES</code></b></a></li> <li><a href="#variable:CMAKE_LANG_LINKER_PREFERENCE"><b><code>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE</code></b></a></li> <li><a href="#variable:CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES"><b><code>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE_PROPAGATES</code></b></a></li> <li><a href="#variable:CMAKE_LANG_LINK_EXECUTABLE"><b><code>CMAKE_&lt;LANG&gt;_LINK_EXECUTABLE </code></b></a></li> <li><a href="#variable:CMAKE_LANG_OUTPUT_EXTENSION"><b><code>CMAKE_&lt;LANG&gt;_OUTPUT_EXTENSION</code></b></a></li> <li><a href="#variable:CMAKE_LANG_PLATFORM_ID"><b><code>CMAKE_&lt;LANG&gt;_PLATFORM_ID</code></b></a></li> <li><a href="#variable:CMAKE_LANG_SIZEOF_DATA_PTR"><b><code>CMAKE_&lt;LANG&gt;_SIZEOF_DATA_PTR</code></b></a></li> <li><a href="#variable:CMAKE_LANG_SOURCE_FILE_EXTENSIONS"><b><code>CMAKE_&lt;LANG&gt;_SOURCE_FILE_EXTENSIONS</code></b></a></li> <li><a href="#variable:CMAKE_COMPILER_IS_GNULANG"><b><code>CMAKE_COMPILER_IS_GNU&lt;LANG&gt;</code></b></a></li> <li><a href="#variable:CMAKE_INTERNAL_PLATFORM_ABI"><b><code>CMAKE_INTERNAL_PLATFORM_ABI</code></b></a></li> <li><a href="#variable:CMAKE_USER_MAKE_RULES_OVERRIDE_LANG"><b><code>CMAKE_USER_MAKE_RULES_OVERRIDE_&lt;LANG&gt;</code></b></a></li></ul>
<ul>
<li>
<a name="variable:CMAKE_LANG_ARCHIVE_APPEND"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND</code></b></a>: Rule variable to append to a static archive.<br>
<p>This is a rule variable that tells CMake how to append to a static archive. It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts. See also CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE and CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH.
</li>
<li>
<a name="variable:CMAKE_LANG_ARCHIVE_CREATE"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE</code></b></a>: Rule variable to create a new static archive.<br>
<p>This is a rule variable that tells CMake how to create a static archive. It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts. See also CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND and CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH.
</li>
<li>
<a name="variable:CMAKE_LANG_ARCHIVE_FINISH"><b><code>CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH</code></b></a>: Rule variable to finish an existing static archive.<br>
<p>This is a rule variable that tells CMake how to finish a static archive. It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts. See also CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE and CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND.
</li>
<li>
<a name="variable:CMAKE_LANG_COMPILER"><b><code>CMAKE_&lt;LANG&gt;_COMPILER</code></b></a>: The full path to the compiler for LANG.<br>
<p>This is the command that will be used as the &lt;LANG&gt; compiler. Once set, you can not change this variable.
</li>
<li>
<a name="variable:CMAKE_LANG_COMPILER_ABI"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_ABI</code></b></a>: An internal variable subject to change.<br>
<p>This is used in determining the compiler ABI and is subject to change.
</li>
<li>
<a name="variable:CMAKE_LANG_COMPILER_ID"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_ID</code></b></a>: An internal variable subject to change.<br>
<p>This is used in determining the compiler and is subject to change.
</li>
<li>
<a name="variable:CMAKE_LANG_COMPILER_LOADED"><b><code>CMAKE_&lt;LANG&gt;_COMPILER_LOADED</code></b></a>: Defined to true if the language is enabled.<br>
<p>When language &lt;LANG&gt; is enabled by project() or enable_language() this variable is defined to 1.
</li>
<li>
<a name="variable:CMAKE_LANG_COMPILE_OBJECT"><b><code>CMAKE_&lt;LANG&gt;_COMPILE_OBJECT</code></b></a>: Rule variable to compile a single object file.<br>
<p>This is a rule variable that tells CMake how to compile a single object file for for the language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_LANG_CREATE_SHARED_LIBRARY"><b><code>CMAKE_&lt;LANG&gt;_CREATE_SHARED_LIBRARY</code></b></a>: Rule variable to create a shared library.<br>
<p>This is a rule variable that tells CMake how to create a shared library for the language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_LANG_CREATE_SHARED_MODULE"><b><code>CMAKE_&lt;LANG&gt;_CREATE_SHARED_MODULE</code></b></a>: Rule variable to create a shared module.<br>
<p>This is a rule variable that tells CMake how to create a shared library for the language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_LANG_CREATE_STATIC_LIBRARY"><b><code>CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY</code></b></a>: Rule variable to create a static library.<br>
<p>This is a rule variable that tells CMake how to create a static library for the language &lt;LANG&gt;.
</li>
<li>
<a name="variable:CMAKE_LANG_FLAGS_DEBUG"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_DEBUG</code></b></a>: Flags for Debug build type or configuration.<br>
<p>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is Debug.
</li>
<li>
<a name="variable:CMAKE_LANG_FLAGS_MINSIZEREL"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_MINSIZEREL</code></b></a>: Flags for MinSizeRel build type or configuration.<br>
<p>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is MinSizeRel.Short for minimum size release.
</li>
<li>
<a name="variable:CMAKE_LANG_FLAGS_RELEASE"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_RELEASE</code></b></a>: Flags for Release build type or configuration.<br>
<p>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is Release
</li>
<li>
<a name="variable:CMAKE_LANG_FLAGS_RELWITHDEBINFO"><b><code>CMAKE_&lt;LANG&gt;_FLAGS_RELWITHDEBINFO</code></b></a>: Flags for RelWithDebInfo type or configuration.<br>
<p>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. Short for Release With Debug Information.
</li>
<li>
<a name="variable:CMAKE_LANG_IGNORE_EXTENSIONS"><b><code>CMAKE_&lt;LANG&gt;_IGNORE_EXTENSIONS</code></b></a>: File extensions that should be ignored by the build.<br>
<p>This is a list of file extensions that may be part of a project for a given language but are not compiled.
</li>
<li>
<a name="variable:CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_INCLUDE_DIRECTORIES</code></b></a>: Directories implicitly searched by the compiler for header files.<br>
<p>CMake does not explicitly specify these directories on compiler command lines for language &lt;LANG&gt;. This prevents system include directories from being treated as user include directories on some compilers.
</li>
<li>
<a name="variable:CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_DIRECTORIES</code></b></a>: Implicit linker search path detected for language &lt;LANG&gt;.<br>
<p>Compilers typically pass directories containing language runtime libraries and default library search paths when they invoke a linker. These paths are implicit linker search directories for the compiler's language. CMake automatically detects these directories for each language and reports the results in this variable.
</li>
<li>
<a name="variable:CMAKE_LANG_IMPLICIT_LINK_LIBRARIES"><b><code>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_LIBRARIES</code></b></a>: Implicit link libraries and flags detected for language &lt;LANG&gt;.<br>
<p>Compilers typically pass language runtime library names and other flags when they invoke a linker. These flags are implicit link options for the compiler's language. CMake automatically detects these libraries and flags for each language and reports the results in this variable.
</li>
<li>
<a name="variable:CMAKE_LANG_LINKER_PREFERENCE"><b><code>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE</code></b></a>: Preference value for linker language selection.<br>
<p>The "linker language" for executable, shared library, and module targets is the language whose compiler will invoke the linker. The LINKER_LANGUAGE target property sets the language explicitly. Otherwise, the linker language is that whose linker preference value is highest among languages compiled and linked into the target. See also the CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE_PROPAGATES variable.
</li>
<li>
<a name="variable:CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES"><b><code>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE_PROPAGATES</code></b></a>: True if CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE propagates across targets.<br>
<p>This is used when CMake selects a linker language for a target. Languages compiled directly into the target are always considered. A language compiled into static libraries linked by the target is considered if this variable is true.
</li>
<li>
<a name="variable:CMAKE_LANG_LINK_EXECUTABLE"><b><code>CMAKE_&lt;LANG&gt;_LINK_EXECUTABLE </code></b></a>: Rule variable to link and executable.<br>
<p>Rule variable to link and executable for the given language.
</li>
<li>
<a name="variable:CMAKE_LANG_OUTPUT_EXTENSION"><b><code>CMAKE_&lt;LANG&gt;_OUTPUT_EXTENSION</code></b></a>: Extension for the output of a compile for a single file.<br>
<p>This is the extension for an object file for the given &lt;LANG&gt;. For example .obj for C on Windows.
</li>
<li>
<a name="variable:CMAKE_LANG_PLATFORM_ID"><b><code>CMAKE_&lt;LANG&gt;_PLATFORM_ID</code></b></a>: An internal variable subject to change.<br>
<p>This is used in determining the platform and is subject to change.
</li>
<li>
<a name="variable:CMAKE_LANG_SIZEOF_DATA_PTR"><b><code>CMAKE_&lt;LANG&gt;_SIZEOF_DATA_PTR</code></b></a>: Size of pointer-to-data types for language &lt;LANG&gt;.<br>
<p>This holds the size (in bytes) of pointer-to-data types in the target platform ABI. It is defined for languages C and CXX (C++).
</li>
<li>
<a name="variable:CMAKE_LANG_SOURCE_FILE_EXTENSIONS"><b><code>CMAKE_&lt;LANG&gt;_SOURCE_FILE_EXTENSIONS</code></b></a>: Extensions of source files for the given language.<br>
<p>This is the list of extensions for a given languages source files.
</li>
<li>
<a name="variable:CMAKE_COMPILER_IS_GNULANG"><b><code>CMAKE_COMPILER_IS_GNU&lt;LANG&gt;</code></b></a>: True if the compiler is GNU.<br>
<p>If the selected &lt;LANG&gt; compiler is the GNU compiler then this is TRUE, if not it is FALSE.
</li>
<li>
<a name="variable:CMAKE_INTERNAL_PLATFORM_ABI"><b><code>CMAKE_INTERNAL_PLATFORM_ABI</code></b></a>: An internal variable subject to change.<br>
<p>This is used in determining the compiler ABI and is subject to change.
</li>
<li>
<a name="variable:CMAKE_USER_MAKE_RULES_OVERRIDE_LANG"><b><code>CMAKE_USER_MAKE_RULES_OVERRIDE_&lt;LANG&gt;</code></b></a>: Specify a file that can change the build rule variables.<br>
<p>If this variable is set, it should to point to a CMakeLists.txt file that will be read in by CMake after all the system settings have been set, but before they have been used. This would allow you to override any variables that need to be changed for some language.
</li>
</ul>
<h2><a name="section_Copyright"/>Copyright</h2>
<ul>
</ul>
<p>Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<p>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.
<p>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2><a name="section_See Also"/>See Also</h2>
<ul>
<li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li></ul>
<p>The following resources are available to get help using CMake:
<ul>
<li>
<a name="see:HomePage"><b><code>Home Page</code></b></a>: <a href="http://www.cmake.org">http://www.cmake.org</a><br>
<p>The primary starting point for learning about CMake.
</li>
<li>
<a name="see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<p>A Wiki is provided containing answers to frequently asked questions.
</li>
<li>
<a name="see:OnlineDocumentation"><b><code>Online Documentation</code></b></a>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br>
<p>Links to available documentation may be found on this web page.
</li>
<li>
<a name="see:MailingList"><b><code>Mailing List</code></b></a>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br>
<p>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 <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.
</li>
</ul>
<p>Summary of helpful links:<br><pre> Home: <a href="http://www.cmake.org">http://www.cmake.org</a><br> Docs: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br> Mail: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br> FAQ: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></pre>
</body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
Copyright (c) 1985, 1986 The Regents of the University of California.
All rights reserved.
This code is derived from software contributed to Berkeley by
James A. Woods, derived from original work by Spencer Thomas
and Joseph Orost.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.

View File

@ -0,0 +1,21 @@
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2009, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.

View File

@ -0,0 +1,21 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,31 @@
KWSys - Kitware System Library
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the names of Kitware, Inc., the Insight Software Consortium,
nor the names of their contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,35 @@
Copyright (c) 1998-2003 University of Illinois Board of Trustees
Copyright (c) 1998-2003 Mark D. Roth
All rights reserved.
Developed by: Campus Information Technologies and Educational Services,
University of Illinois at Urbana-Champaign
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal with the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of Campus Information Technologies and Educational
Services, University of Illinois at Urbana-Champaign, nor the names
of its contributors may be used to endorse or promote products derived
from this Software without specific prior written permission.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

View File

@ -0,0 +1,23 @@
'zlib' general purpose compression library
version 1.2.3, July 18th, 2005
Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu

View File

@ -0,0 +1,143 @@
<?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>cpack - cpack</title>
</articleinfo>
<sect1 id="section_Name">
<title>
Name</title>
<itemizedlist>
</itemizedlist>
<literallayout> cpack - Packaging driver provided by CMake.</literallayout>
</sect1>
<sect1 id="section_Usage">
<title>
Usage</title>
<itemizedlist>
</itemizedlist>
<literallayout> cpack -G &lt;generator&gt; [options]</literallayout>
</sect1>
<sect1 id="section_Description">
<title>
Description</title>
<itemizedlist>
</itemizedlist>
<para>The "cpack" executable is the CMake packaging program. CMake-generated build trees created for projects that use the INSTALL_* commands have packaging support. This program will generate the package.</para>
<para>CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.</para>
</sect1>
<sect1 id="section_Options">
<title>
Options</title>
<itemizedlist>
<listitem><link linkend="opt_-G &lt;generator&gt;"><emphasis><literal>-G &lt;generator&gt;</literal></emphasis></link></listitem>
<listitem><link linkend="opt_-C &lt;Configuration&gt;"><emphasis><literal>-C &lt;Configuration&gt;</literal></emphasis></link></listitem>
<listitem><link linkend="opt_-D &lt;var&gt;=&lt;value&gt;"><emphasis><literal>-D &lt;var&gt;=&lt;value&gt;</literal></emphasis></link></listitem>
<listitem><link linkend="opt_--config &lt;config file&gt;"><emphasis><literal>--config &lt;config file&gt;</literal></emphasis></link></listitem>
</itemizedlist>
<para id="opt_-G &lt;generator&gt;"><sect2><title>-G &lt;generator&gt;</title></sect2> Use the specified generator to generate package.</para>
<para>CPack may support multiple native packaging systems on certain platforms. A generator is responsible for generating input files for particular system and invoking that systems. Possible generator names are specified in the Generators section.</para>
<para id="opt_-C &lt;Configuration&gt;"><sect2><title>-C &lt;Configuration&gt;</title></sect2> Specify the project configuration</para>
<para>This option specifies the configuration that the project was build with, for example 'Debug', 'Release'.</para>
<para id="opt_-D &lt;var&gt;=&lt;value&gt;"><sect2><title>-D &lt;var&gt;=&lt;value&gt;</title></sect2> Set a CPack variable.</para>
<para>Set a variable that can be used by the generator.</para>
<para id="opt_--config &lt;config file&gt;"><sect2><title>--config &lt;config file&gt;</title></sect2> Specify the config file.</para>
<para>Specify the config file to use to create the package. By default CPackConfig.cmake in the current directory will be used.</para>
</sect1>
<sect1 id="section_Generators">
<title>
Generators</title>
<itemizedlist>
<listitem><link linkend="gen_NSIS"><emphasis><literal>NSIS</literal></emphasis></link></listitem>
<listitem><link linkend="gen_STGZ"><emphasis><literal>STGZ</literal></emphasis></link></listitem>
<listitem><link linkend="gen_TBZ2"><emphasis><literal>TBZ2</literal></emphasis></link></listitem>
<listitem><link linkend="gen_TGZ"><emphasis><literal>TGZ</literal></emphasis></link></listitem>
<listitem><link linkend="gen_TZ"><emphasis><literal>TZ</literal></emphasis></link></listitem>
<listitem><link linkend="gen_ZIP"><emphasis><literal>ZIP</literal></emphasis></link></listitem>
</itemizedlist>
<para id="gen_NSIS"><sect2><title>NSIS</title></sect2> Null Soft Installer</para>
<para id="gen_STGZ"><sect2><title>STGZ</title></sect2> Self extracting Tar GZip compression</para>
<para id="gen_TBZ2"><sect2><title>TBZ2</title></sect2> Tar BZip2 compression</para>
<para id="gen_TGZ"><sect2><title>TGZ</title></sect2> Tar GZip compression</para>
<para id="gen_TZ"><sect2><title>TZ</title></sect2> Tar Compress compression</para>
<para id="gen_ZIP"><sect2><title>ZIP</title></sect2> ZIP file format</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>
</sect1>
<sect1 id="section_Copyright">
<title>
Copyright</title>
<itemizedlist>
</itemizedlist>
<para>Copyright 2000-2009 Kitware, Inc., Insight Software 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>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.</para>
<para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</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>

View File

@ -0,0 +1,122 @@
<html><head><title>cpack - cpack</title></head><body>
<h2><a name="section_Index"/>Master Index CMake 2.8.0</h2>
<ul>
<li><a href="#section_Name"<b>Name</b></a></li>
<li><a href="#section_Usage"<b>Usage</b></a></li>
<li><a href="#section_Description"<b>Description</b></a></li>
<li><a href="#section_Options"<b>Options</b></a></li>
<li><a href="#section_Generators"<b>Generators</b></a></li>
<li><a href="#section_Properties"<b>Properties</b></a></li>
<li><a href="#section_Compatibility Commands"<b>Compatibility Commands</b></a></li>
<li><a href="#section_Standard CMake Modules"<b>Standard CMake Modules</b></a></li>
<li><a href="#section_Copyright"<b>Copyright</b></a></li>
<li><a href="#section_See Also"<b>See Also</b></a></li>
</ul>
<h2><a name="section_Name"/>Name</h2>
<ul>
</ul>
<pre> cpack - Packaging driver provided by CMake.</pre>
<h2><a name="section_Usage"/>Usage</h2>
<ul>
</ul>
<pre> cpack -G &lt;generator&gt; [options]</pre>
<h2><a name="section_Description"/>Description</h2>
<ul>
</ul>
<p>The "cpack" executable is the CMake packaging program. CMake-generated build trees created for projects that use the INSTALL_* commands have packaging support. This program will generate the package.
<p>CMake is a cross-platform build system generator. Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.
<h2><a name="section_Options"/>Options</h2>
<ul>
<li><a href="#opt:-Ggenerator"><b><code>-G &lt;generator&gt;</code></b></a></li> <li><a href="#opt:-CConfiguration"><b><code>-C &lt;Configuration&gt;</code></b></a></li> <li><a href="#opt:-Dvarvalue"><b><code>-D &lt;var&gt;=&lt;value&gt;</code></b></a></li> <li><a href="#opt:--configconfigfile"><b><code>--config &lt;config file&gt;</code></b></a></li></ul>
<ul>
<li>
<a name="opt:-Ggenerator"><b><code>-G &lt;generator&gt;</code></b></a>: Use the specified generator to generate package.<br>
<p>CPack may support multiple native packaging systems on certain platforms. A generator is responsible for generating input files for particular system and invoking that systems. Possible generator names are specified in the Generators section.
</li>
<li>
<a name="opt:-CConfiguration"><b><code>-C &lt;Configuration&gt;</code></b></a>: Specify the project configuration<br>
<p>This option specifies the configuration that the project was build with, for example 'Debug', 'Release'.
</li>
<li>
<a name="opt:-Dvarvalue"><b><code>-D &lt;var&gt;=&lt;value&gt;</code></b></a>: Set a CPack variable.<br>
<p>Set a variable that can be used by the generator.
</li>
<li>
<a name="opt:--configconfigfile"><b><code>--config &lt;config file&gt;</code></b></a>: Specify the config file.<br>
<p>Specify the config file to use to create the package. By default CPackConfig.cmake in the current directory will be used.
</li>
</ul>
<h2><a name="section_Generators"/>Generators</h2>
<ul>
<li><a href="#gen:NSIS"><b><code>NSIS</code></b></a></li> <li><a href="#gen:STGZ"><b><code>STGZ</code></b></a></li> <li><a href="#gen:TBZ2"><b><code>TBZ2</code></b></a></li> <li><a href="#gen:TGZ"><b><code>TGZ</code></b></a></li> <li><a href="#gen:TZ"><b><code>TZ</code></b></a></li> <li><a href="#gen:ZIP"><b><code>ZIP</code></b></a></li></ul>
<ul>
<li>
<a name="gen:NSIS"><b><code>NSIS</code></b></a>: Null Soft Installer
</li>
<li>
<a name="gen:STGZ"><b><code>STGZ</code></b></a>: Self extracting Tar GZip compression
</li>
<li>
<a name="gen:TBZ2"><b><code>TBZ2</code></b></a>: Tar BZip2 compression
</li>
<li>
<a name="gen:TGZ"><b><code>TGZ</code></b></a>: Tar GZip compression
</li>
<li>
<a name="gen:TZ"><b><code>TZ</code></b></a>: Tar Compress compression
</li>
<li>
<a name="gen:ZIP"><b><code>ZIP</code></b></a>: ZIP file format
</li>
</ul>
<h2><a name="section_Properties"/>Properties</h2>
<ul>
</ul>
<pre> CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.</pre>
<p>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.
<h2><a name="section_Compatibility Commands"/>Compatibility Commands</h2>
<ul>
</ul>
<pre> CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.</pre>
<p>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. ;-)
<h2><a name="section_Standard CMake Modules"/>Standard CMake Modules</h2>
<ul>
</ul>
<h2><a name="section_Copyright"/>Copyright</h2>
<ul>
</ul>
<p>Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<p>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.
<p>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2><a name="section_See Also"/>See Also</h2>
<ul>
<li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li></ul>
<p>The following resources are available to get help using CMake:
<ul>
<li>
<a name="see:HomePage"><b><code>Home Page</code></b></a>: <a href="http://www.cmake.org">http://www.cmake.org</a><br>
<p>The primary starting point for learning about CMake.
</li>
<li>
<a name="see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<p>A Wiki is provided containing answers to frequently asked questions.
</li>
<li>
<a name="see:OnlineDocumentation"><b><code>Online Documentation</code></b></a>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br>
<p>Links to available documentation may be found on this web page.
</li>
<li>
<a name="see:MailingList"><b><code>Mailing List</code></b></a>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br>
<p>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 <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.
</li>
</ul>
<p>Summary of helpful links:<br><pre> Home: <a href="http://www.cmake.org">http://www.cmake.org</a><br> Docs: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br> Mail: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br> FAQ: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></pre>
</body></html>

View File

@ -0,0 +1,163 @@
cpack version 2.8.0
------------------------------------------------------------------------------
Name
cpack - Packaging driver provided by CMake.
------------------------------------------------------------------------------
Usage
cpack -G <generator> [options]
------------------------------------------------------------------------------
Description
The "cpack" executable is the CMake packaging program. CMake-generated build
trees created for projects that use the INSTALL_* commands have packaging
support. This program will generate the package.
CMake is a cross-platform build system generator. Projects specify their
build process with platform-independent CMake listfiles included in each
directory of a source tree with the name CMakeLists.txt. Users build a
project by using CMake to generate a build system for a native tool on their
platform.
------------------------------------------------------------------------------
Options
-G <generator>
Use the specified generator to generate package.
CPack may support multiple native packaging systems on certain
platforms. A generator is responsible for generating input files for
particular system and invoking that systems. Possible generator names
are specified in the Generators section.
-C <Configuration>
Specify the project configuration
This option specifies the configuration that the project was build
with, for example 'Debug', 'Release'.
-D <var>=<value>
Set a CPack variable.
Set a variable that can be used by the generator.
--config <config file>
Specify the config file.
Specify the config file to use to create the package. By default
CPackConfig.cmake in the current directory will be used.
------------------------------------------------------------------------------
Generators
NSIS
Null Soft Installer
STGZ
Self extracting Tar GZip compression
TBZ2
Tar BZip2 compression
TGZ
Tar GZip compression
TZ
Tar Compress compression
ZIP
ZIP file format
------------------------------------------------------------------------------
Properties
CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.
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.
------------------------------------------------------------------------------
Compatibility Commands
CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.
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. ;-)
------------------------------------------------------------------------------
Standard CMake Modules
------------------------------------------------------------------------------
Copyright
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the
names of their contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
See Also
The following resources are available to get help using CMake:
Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
Mailing List
http://www.cmake.org/HTML/MailingLists.html
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
http://www.cmake.org before posting questions to the list.
Summary of helpful links:
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,659 @@
<html><head><title>ctest - ctest</title></head><body>
<h2><a name="section_Index"/>Master Index CMake 2.8.0</h2>
<ul>
<li><a href="#section_Name"<b>Name</b></a></li>
<li><a href="#section_Usage"<b>Usage</b></a></li>
<li><a href="#section_Description"<b>Description</b></a></li>
<li><a href="#section_Options"<b>Options</b></a></li>
<li><a href="#section_Generators"<b>Generators</b></a></li>
<li><a href="#section_Commands"<b>Commands</b></a></li>
<li><a href="#section_Properties"<b>Properties</b></a></li>
<li><a href="#section_Compatibility Commands"<b>Compatibility Commands</b></a></li>
<li><a href="#section_Standard CMake Modules"<b>Standard CMake Modules</b></a></li>
<li><a href="#section_Copyright"<b>Copyright</b></a></li>
<li><a href="#section_See Also"<b>See Also</b></a></li>
</ul>
<h2><a name="section_Name"/>Name</h2>
<ul>
</ul>
<pre> ctest - Testing driver provided by CMake.</pre>
<h2><a name="section_Usage"/>Usage</h2>
<ul>
</ul>
<pre> ctest [options]</pre>
<h2><a name="section_Description"/>Description</h2>
<ul>
</ul>
<p>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.
<h2><a name="section_Options"/>Options</h2>
<ul>
<li><a href="#opt:-Ccfg--build-configcfg"><b><code>-C &lt;cfg&gt;, --build-config &lt;cfg&gt;</code></b></a></li> <li><a href="#opt:-V--verbose"><b><code>-V,--verbose</code></b></a></li> <li><a href="#opt:-VV--extra-verbose"><b><code>-VV,--extra-verbose</code></b></a></li> <li><a href="#opt:--debug"><b><code>--debug</code></b></a></li> <li><a href="#opt:--output-on-failure"><b><code>--output-on-failure</code></b></a></li> <li><a href="#opt:-F"><b><code>-F</code></b></a></li> <li><a href="#opt:-Q--quiet"><b><code>-Q,--quiet</code></b></a></li> <li><a href="#opt:-Ofile--output-logfile"><b><code>-O &lt;file&gt;, --output-log &lt;file&gt;</code></b></a></li> <li><a href="#opt:-N--show-only"><b><code>-N,--show-only</code></b></a></li> <li><a href="#opt:-Lregex--label-regexregex"><b><code>-L &lt;regex&gt;, --label-regex &lt;regex&gt;</code></b></a></li> <li><a href="#opt:-Rregex--tests-regexregex"><b><code>-R &lt;regex&gt;, --tests-regex &lt;regex&gt;</code></b></a></li> <li><a href="#opt:-Eregex--exclude-regexregex"><b><code>-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;</code></b></a></li> <li><a href="#opt:-LEregex--label-excluderegex"><b><code>-LE &lt;regex&gt;, --label-exclude &lt;regex&gt;</code></b></a></li> <li><a href="#opt:-Ddashboard--dashboarddashboard"><b><code>-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;</code></b></a></li> <li><a href="#opt:-Mmodel--test-modelmodel"><b><code>-M &lt;model&gt;, --test-model &lt;model&gt;</code></b></a></li> <li><a href="#opt:-Taction--test-actionaction"><b><code>-T &lt;action&gt;, --test-action &lt;action&gt;</code></b></a></li> <li><a href="#opt:--tracktrack"><b><code>--track &lt;track&gt;</code></b></a></li> <li><a href="#opt:-Sscript--scriptscript"><b><code>-S &lt;script&gt;, --script &lt;script&gt;</code></b></a></li> <li><a href="#opt:-SPscript--script-new-processscript"><b><code>-SP &lt;script&gt;, --script-new-process &lt;script&gt;</code></b></a></li> <li><a href="#opt:-Afile--add-notesfile"><b><code>-A &lt;file&gt;, --add-notes &lt;file&gt;</code></b></a></li> <li><a href="#opt:-IStartEndStridetesttestTestfile--tests-information"><b><code>-I [Start,End,Stride,test#,test#|Test file], --tests-information</code></b></a></li> <li><a href="#opt:-U--union"><b><code>-U, --union</code></b></a></li> <li><a href="#opt:--max-widthwidth"><b><code>--max-width &lt;width&gt;</code></b></a></li> <li><a href="#opt:--interactive-debug-mode01"><b><code>--interactive-debug-mode [0|1]</code></b></a></li> <li><a href="#opt:--no-label-summary"><b><code>--no-label-summary</code></b></a></li> <li><a href="#opt:--build-and-test"><b><code>--build-and-test</code></b></a></li> <li><a href="#opt:--build-target"><b><code>--build-target</code></b></a></li> <li><a href="#opt:--build-nocmake"><b><code>--build-nocmake</code></b></a></li> <li><a href="#opt:--build-run-dir"><b><code>--build-run-dir</code></b></a></li> <li><a href="#opt:--build-two-config"><b><code>--build-two-config</code></b></a></li> <li><a href="#opt:--build-exe-dir"><b><code>--build-exe-dir</code></b></a></li> <li><a href="#opt:--build-generator"><b><code>--build-generator</code></b></a></li> <li><a href="#opt:--build-project"><b><code>--build-project</code></b></a></li> <li><a href="#opt:--build-makeprogram"><b><code>--build-makeprogram</code></b></a></li> <li><a href="#opt:--build-noclean"><b><code>--build-noclean</code></b></a></li> <li><a href="#opt:--build-config-sample"><b><code>--build-config-sample</code></b></a></li> <li><a href="#opt:--build-options"><b><code>--build-options</code></b></a></li> <li><a href="#opt:--test-command"><b><code>--test-command</code></b></a></li> <li><a href="#opt:--test-timeout"><b><code>--test-timeout</code></b></a></li> <li><a href="#opt:--tomorrow-tag"><b><code>--tomorrow-tag</code></b></a></li> <li><a href="#opt:--ctest-config"><b><code>--ctest-config</code></b></a></li> <li><a href="#opt:--overwrite"><b><code>--overwrite</code></b></a></li> <li><a href="#opt:--extra-submitfilefile"><b><code>--extra-submit &lt;file&gt;[;&lt;file&gt;]</code></b></a></li> <li><a href="#opt:--force-new-ctest-process"><b><code>--force-new-ctest-process</code></b></a></li> <li><a href="#opt:--submit-index"><b><code>--submit-index</code></b></a></li> <li><a href="#opt:--help-commandcmdfile"><b><code>--help-command &lt;cmd&gt; [&lt;file&gt;]</code></b></a></li> <li><a href="#opt:--help-command-listfile"><b><code>--help-command-list [&lt;file&gt;]</code></b></a></li> <li><a href="#opt:--help-commandsfile"><b><code>--help-commands [&lt;file&gt;]</code></b></a></li></ul>
<ul>
<li>
<a name="opt:-Ccfg--build-configcfg"><b><code>-C &lt;cfg&gt;, --build-config &lt;cfg&gt;</code></b></a>: Choose configuration to test.<br>
<p>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".
</li>
<li>
<a name="opt:-V--verbose"><b><code>-V,--verbose</code></b></a>: Enable verbose output from tests.<br>
<p>Test output is normally suppressed and only summary information is displayed. This option will show all test output.
</li>
<li>
<a name="opt:-VV--extra-verbose"><b><code>-VV,--extra-verbose</code></b></a>: Enable more verbose output from tests.<br>
<p>Test output is normally suppressed and only summary information is displayed. This option will show even more test output.
</li>
<li>
<a name="opt:--debug"><b><code>--debug</code></b></a>: Displaying more verbose internals of CTest.<br>
<p>This feature will result in large number of output that is mostly useful for debugging dashboard problems.
</li>
<li>
<a name="opt:--output-on-failure"><b><code>--output-on-failure</code></b></a>: Output anything outputted by the test program if the test should fail. This option can also be enabled by setting the environment variable CTEST_OUTPUT_ON_FAILURE
</li>
<li>
<a name="opt:-F"><b><code>-F</code></b></a>: Enable failover.<br>
<p>This option allows ctest to resume a test set execution that was previously interrupted. If no interruption occurred, the -F option will have no effect.
</li>
<li>
<a name="opt:-Q--quiet"><b><code>-Q,--quiet</code></b></a>: Make ctest quiet.<br>
<p>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.
</li>
<li>
<a name="opt:-Ofile--output-logfile"><b><code>-O &lt;file&gt;, --output-log &lt;file&gt;</code></b></a>: Output to log file<br>
<p>This option tells ctest to write all its output to a log file.
</li>
<li>
<a name="opt:-N--show-only"><b><code>-N,--show-only</code></b></a>: Disable actual execution of tests.<br>
<p>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.
</li>
<li>
<a name="opt:-Lregex--label-regexregex"><b><code>-L &lt;regex&gt;, --label-regex &lt;regex&gt;</code></b></a>: Run tests with labels matching regular expression.<br>
<p>This option tells ctest to run only the tests whose labels match the given regular expression.
</li>
<li>
<a name="opt:-Rregex--tests-regexregex"><b><code>-R &lt;regex&gt;, --tests-regex &lt;regex&gt;</code></b></a>: Run tests matching regular expression.<br>
<p>This option tells ctest to run only the tests whose names match the given regular expression.
</li>
<li>
<a name="opt:-Eregex--exclude-regexregex"><b><code>-E &lt;regex&gt;, --exclude-regex &lt;regex&gt;</code></b></a>: Exclude tests matching regular expression.<br>
<p>This option tells ctest to NOT run the tests whose names match the given regular expression.
</li>
<li>
<a name="opt:-LEregex--label-excluderegex"><b><code>-LE &lt;regex&gt;, --label-exclude &lt;regex&gt;</code></b></a>: Exclude tests with labels matching regular expression.<br>
<p>This option tells ctest to NOT run the tests whose labels match the given regular expression.
</li>
<li>
<a name="opt:-Ddashboard--dashboarddashboard"><b><code>-D &lt;dashboard&gt;, --dashboard &lt;dashboard&gt;</code></b></a>: Execute dashboard test<br>
<p>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.
</li>
<li>
<a name="opt:-Mmodel--test-modelmodel"><b><code>-M &lt;model&gt;, --test-model &lt;model&gt;</code></b></a>: Sets the model for a dashboard<br>
<p>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
</li>
<li>
<a name="opt:-Taction--test-actionaction"><b><code>-T &lt;action&gt;, --test-action &lt;action&gt;</code></b></a>: Sets the dashboard action to perform<br>
<p>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
</li>
<li>
<a name="opt:--tracktrack"><b><code>--track &lt;track&gt;</code></b></a>: Specify the track to submit dashboard to<br>
<p>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.
</li>
<li>
<a name="opt:-Sscript--scriptscript"><b><code>-S &lt;script&gt;, --script &lt;script&gt;</code></b></a>: Execute a dashboard for a configuration<br>
<p>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.
</li>
<li>
<a name="opt:-SPscript--script-new-processscript"><b><code>-SP &lt;script&gt;, --script-new-process &lt;script&gt;</code></b></a>: Execute a dashboard for a configuration<br>
<p>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.
</li>
<li>
<a name="opt:-Afile--add-notesfile"><b><code>-A &lt;file&gt;, --add-notes &lt;file&gt;</code></b></a>: Add a notes file with submission<br>
<p>This option tells ctest to include a notes file when submitting dashboard.
</li>
<li>
<a name="opt:-IStartEndStridetesttestTestfile--tests-information"><b><code>-I [Start,End,Stride,test#,test#|Test file], --tests-information</code></b></a>: Run a specific number of tests by number.<br>
<p>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.
</li>
<li>
<a name="opt:-U--union"><b><code>-U, --union</code></b></a>: Take the Union of -I and -R<br>
<p>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.
</li>
<li>
<a name="opt:--max-widthwidth"><b><code>--max-width &lt;width&gt;</code></b></a>: Set the max width for a test name to output<br>
<p>Set the maximum width for each test name to show in the output. This allows the user to widen the output to avoid cliping the test name which can be very annoying.
</li>
<li>
<a name="opt:--interactive-debug-mode01"><b><code>--interactive-debug-mode [0|1]</code></b></a>: Set the interactive mode to 0 or 1.<br>
<p>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.
</li>
<li>
<a name="opt:--no-label-summary"><b><code>--no-label-summary</code></b></a>: Disable timing summary information for labels.<br>
<p>This option tells ctest to not print summary information for each label associated with the tests run. If there are no labels on the tests, nothing extra is printed.
</li>
<li>
<a name="opt:--build-and-test"><b><code>--build-and-test</code></b></a>: Configure, build and run a test.<br>
<p>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
</li>
<li>
<a name="opt:--build-target"><b><code>--build-target</code></b></a>: Specify a specific target to build.<br>
<p>This option goes with the --build-and-test option, if left out the all target is built.
</li>
<li>
<a name="opt:--build-nocmake"><b><code>--build-nocmake</code></b></a>: Run the build without running cmake first.<br>
<p>Skip the cmake step.
</li>
<li>
<a name="opt:--build-run-dir"><b><code>--build-run-dir</code></b></a>: Specify directory to run programs from.<br>
<p>Directory where programs will be after it has been compiled.
</li>
<li>
<a name="opt:--build-two-config"><b><code>--build-two-config</code></b></a>: Run CMake twice
</li>
<li>
<a name="opt:--build-exe-dir"><b><code>--build-exe-dir</code></b></a>: Specify the directory for the executable.
</li>
<li>
<a name="opt:--build-generator"><b><code>--build-generator</code></b></a>: Specify the generator to use.
</li>
<li>
<a name="opt:--build-project"><b><code>--build-project</code></b></a>: Specify the name of the project to build.
</li>
<li>
<a name="opt:--build-makeprogram"><b><code>--build-makeprogram</code></b></a>: Specify the make program to use.
</li>
<li>
<a name="opt:--build-noclean"><b><code>--build-noclean</code></b></a>: Skip the make clean step.
</li>
<li>
<a name="opt:--build-config-sample"><b><code>--build-config-sample</code></b></a>: A sample executable to use to determine the configuraiton<br>
<p>A sample executable to use to determine the configuraiton that should be used. e.g. Debug/Release/etc
</li>
<li>
<a name="opt:--build-options"><b><code>--build-options</code></b></a>: Add extra options to the build step.<br>
<p>This option must be the last option with the exception of --test-command
</li>
<li>
<a name="opt:--test-command"><b><code>--test-command</code></b></a>: The test to run with the --build-and-test option.
</li>
<li>
<a name="opt:--test-timeout"><b><code>--test-timeout</code></b></a>: The time limit in seconds, internal use only.
</li>
<li>
<a name="opt:--tomorrow-tag"><b><code>--tomorrow-tag</code></b></a>: Nightly or experimental starts with next day tag.<br>
<p>This is useful if the build will not finish in one day.
</li>
<li>
<a name="opt:--ctest-config"><b><code>--ctest-config</code></b></a>: The configuration file used to initialize CTest state when submitting dashboards.<br>
<p>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.
</li>
<li>
<a name="opt:--overwrite"><b><code>--overwrite</code></b></a>: Overwrite CTest configuration option.<br>
<p>By default ctest uses configuration options from configuration file. This option will overwrite the configuration option.
</li>
<li>
<a name="opt:--extra-submitfilefile"><b><code>--extra-submit &lt;file&gt;[;&lt;file&gt;]</code></b></a>: Submit extra files to the dashboard.<br>
<p>This option will submit extra files to the dashboard.
</li>
<li>
<a name="opt:--force-new-ctest-process"><b><code>--force-new-ctest-process</code></b></a>: Run child CTest instances as new processes<br>
<p>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.
</li>
<li>
<a name="opt:--submit-index"><b><code>--submit-index</code></b></a>: Submit individual dashboard tests with specific index<br>
<p>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.
</li>
<li>
<a name="opt:--help-commandcmdfile"><b><code>--help-command &lt;cmd&gt; [&lt;file&gt;]</code></b></a>: Show help for a single command and exit.<br>
<p>Prints the help for the command to stdout or to the specified file.
</li>
<li>
<a name="opt:--help-command-listfile"><b><code>--help-command-list [&lt;file&gt;]</code></b></a>: List available commands and exit.<br>
<p>Prints the list of all available listfile commands to stdout or the specified file.
</li>
<li>
<a name="opt:--help-commandsfile"><b><code>--help-commands [&lt;file&gt;]</code></b></a>: Print help for all commands and exit.<br>
<p>Prints the help for all commands to stdout or to the specified file.
</li>
</ul>
<h2><a name="section_Generators"/>Generators</h2>
<ul>
</ul>
<p>The following generators are available on this platform:
<h2><a name="section_Commands"/>Commands</h2>
<ul>
<li><a href="#command:break"><b><code>break</code></b></a></li> <li><a href="#command:build_name"><b><code>build_name</code></b></a></li> <li><a href="#command:cmake_minimum_required"><b><code>cmake_minimum_required</code></b></a></li> <li><a href="#command:cmake_policy"><b><code>cmake_policy</code></b></a></li> <li><a href="#command:configure_file"><b><code>configure_file</code></b></a></li> <li><a href="#command:ctest_build"><b><code>ctest_build</code></b></a></li> <li><a href="#command:ctest_configure"><b><code>ctest_configure</code></b></a></li> <li><a href="#command:ctest_coverage"><b><code>ctest_coverage</code></b></a></li> <li><a href="#command:ctest_empty_binary_directory"><b><code>ctest_empty_binary_directory</code></b></a></li> <li><a href="#command:ctest_memcheck"><b><code>ctest_memcheck</code></b></a></li> <li><a href="#command:ctest_read_custom_files"><b><code>ctest_read_custom_files</code></b></a></li> <li><a href="#command:ctest_run_script"><b><code>ctest_run_script</code></b></a></li> <li><a href="#command:ctest_sleep"><b><code>ctest_sleep</code></b></a></li> <li><a href="#command:ctest_start"><b><code>ctest_start</code></b></a></li> <li><a href="#command:ctest_submit"><b><code>ctest_submit</code></b></a></li> <li><a href="#command:ctest_test"><b><code>ctest_test</code></b></a></li> <li><a href="#command:ctest_update"><b><code>ctest_update</code></b></a></li> <li><a href="#command:else"><b><code>else</code></b></a></li> <li><a href="#command:elseif"><b><code>elseif</code></b></a></li> <li><a href="#command:endforeach"><b><code>endforeach</code></b></a></li> <li><a href="#command:endfunction"><b><code>endfunction</code></b></a></li> <li><a href="#command:endif"><b><code>endif</code></b></a></li> <li><a href="#command:endmacro"><b><code>endmacro</code></b></a></li> <li><a href="#command:endwhile"><b><code>endwhile</code></b></a></li> <li><a href="#command:exec_program"><b><code>exec_program</code></b></a></li> <li><a href="#command:execute_process"><b><code>execute_process</code></b></a></li> <li><a href="#command:file"><b><code>file</code></b></a></li> <li><a href="#command:find_file"><b><code>find_file</code></b></a></li> <li><a href="#command:find_library"><b><code>find_library</code></b></a></li> <li><a href="#command:find_package"><b><code>find_package</code></b></a></li> <li><a href="#command:find_path"><b><code>find_path</code></b></a></li> <li><a href="#command:find_program"><b><code>find_program</code></b></a></li> <li><a href="#command:foreach"><b><code>foreach</code></b></a></li> <li><a href="#command:function"><b><code>function</code></b></a></li> <li><a href="#command:get_cmake_property"><b><code>get_cmake_property</code></b></a></li> <li><a href="#command:get_directory_property"><b><code>get_directory_property</code></b></a></li> <li><a href="#command:get_filename_component"><b><code>get_filename_component</code></b></a></li> <li><a href="#command:get_property"><b><code>get_property</code></b></a></li> <li><a href="#command:if"><b><code>if</code></b></a></li> <li><a href="#command:include"><b><code>include</code></b></a></li> <li><a href="#command:list"><b><code>list</code></b></a></li> <li><a href="#command:macro"><b><code>macro</code></b></a></li> <li><a href="#command:make_directory"><b><code>make_directory</code></b></a></li> <li><a href="#command:mark_as_advanced"><b><code>mark_as_advanced</code></b></a></li> <li><a href="#command:math"><b><code>math</code></b></a></li> <li><a href="#command:message"><b><code>message</code></b></a></li> <li><a href="#command:option"><b><code>option</code></b></a></li> <li><a href="#command:remove"><b><code>remove</code></b></a></li> <li><a href="#command:return"><b><code>return</code></b></a></li> <li><a href="#command:separate_arguments"><b><code>separate_arguments</code></b></a></li> <li><a href="#command:set"><b><code>set</code></b></a></li> <li><a href="#command:set_directory_properties"><b><code>set_directory_properties</code></b></a></li> <li><a href="#command:set_property"><b><code>set_property</code></b></a></li> <li><a href="#command:site_name"><b><code>site_name</code></b></a></li> <li><a href="#command:string"><b><code>string</code></b></a></li> <li><a href="#command:unset"><b><code>unset</code></b></a></li> <li><a href="#command:variable_watch"><b><code>variable_watch</code></b></a></li> <li><a href="#command:while"><b><code>while</code></b></a></li> <li><a href="#command:write_file"><b><code>write_file</code></b></a></li></ul>
<ul>
<li>
<a name="command:break"><b><code>break</code></b></a>: Break from an enclosing foreach or while loop.<br>
<pre> break()<br></pre>
<p>Breaks from an enclosing foreach loop or while loop
</li>
<li>
<a name="command:build_name"><b><code>build_name</code></b></a>: Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.<br>
<pre> build_name(variable)<br></pre>
<p>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.
</li>
<li>
<a name="command:cmake_minimum_required"><b><code>cmake_minimum_required</code></b></a>: Set the minimum required version of cmake for a project.<br>
<pre> cmake_minimum_required(VERSION major[.minor[.patch]]<br> [FATAL_ERROR])<br></pre>
<p>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<br><pre> cmake_policy(VERSION major[.minor[.patch]])<br></pre>
<p>which sets the cmake policy version level to the version specified. When version 2.4 or lower is given the command implicitly invokes<br><pre> cmake_policy(VERSION 2.4)<br></pre>
<p>which enables compatibility features for CMake 2.4 and lower.<br><p>The FATAL_ERROR option is accepted but ignored by CMake 2.6 and higher. It should be specified so CMake versions 2.4 and lower fail with an error instead of just a warning.
</li>
<li>
<a name="command:cmake_policy"><b><code>cmake_policy</code></b></a>: Manage CMake Policy settings.<br>
<p>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.<br><p>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.<br><pre> cmake_policy(VERSION major.minor[.patch])<br></pre>
<p>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 unset. 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.<br><pre> cmake_policy(SET CMP&lt;NNNN&gt; NEW)<br> cmake_policy(SET CMP&lt;NNNN&gt; OLD)<br></pre>
<p>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.<br><pre> cmake_policy(GET CMP&lt;NNNN&gt; &lt;variable&gt;)<br></pre>
<p>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.<br><p>CMake keeps policy settings on a stack, so changes made by the cmake_policy command affect only the top of the stack. A new entry on the policy stack is managed automatically for each subdirectory to protect its parents and siblings. CMake also manages a new entry for scripts loaded by include() and find_package() commands except when invoked with the NO_POLICY_SCOPE option (see also policy CMP0011). The cmake_policy command provides an interface to manage custom entries on the policy stack:<br><pre> cmake_policy(PUSH)<br> cmake_policy(POP)<br></pre>
<p>Each PUSH must have a matching POP to erase any changes. This is useful to make temporary changes to policy settings.<br><p>Functions and macros record policy settings when they are created and use the pre-record policies when they are invoked. If the function or macro implementation sets policies, the changes automatically propagate up through callers until they reach the closest nested policy stack entry.
</li>
<li>
<a name="command:configure_file"><b><code>configure_file</code></b></a>: Copy a file to another location and modify its contents.<br>
<pre> configure_file(&lt;input&gt; &lt;output&gt;<br> [COPYONLY] [ESCAPE_QUOTES] [@ONLY])<br></pre>
<p>Copies a file &lt;input&gt; to file &lt;output&gt; and substitutes variable values referenced in the file content. If &lt;input&gt; is a relative path it is evaluated with respect to the current source directory. The &lt;input&gt; must be a file, not a directory. If &lt;output&gt; is a relative path it is evaluated with respect to the current binary directory. If &lt;output&gt; names an existing directory the input file is placed in that directory with its original name. <br><p>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. Any occurrences of #cmakedefine01 VAR will be replaced with either #define VAR 1 or #define VAR 0 depending on whether VAR evaluates to TRUE or FALSE in CMake
</li>
<li>
<a name="command:ctest_build"><b><code>ctest_build</code></b></a>: Build the project.<br>
<pre> ctest_build([BUILD build_dir] [RETURN_VALUE res] [APPEND]<br> [NUMBER_ERRORS val] [NUMBER_WARNINGS val])<br></pre>
<p>Builds the given build directory and stores results in Build.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. The RETURN_VALUE option specifies a variable in which to store the return value of the native build tool. The NUMBER_ERRORS and NUMBER_WARNINGS options specify variables in which to store the number of build errors and warnings detected.<br><p>The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.
</li>
<li>
<a name="command:ctest_configure"><b><code>ctest_configure</code></b></a>: Configure the project build tree.<br>
<pre> ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]<br> [OPTIONS options] [RETURN_VALUE res])<br></pre>
<p>Configures the given build directory and stores results in Configure.xml. If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. The OPTIONS argument specifies command line arguments to pass to the configuration tool. The RETURN_VALUE option specifies a variable in which to store the return value of the native build tool.<br><p>The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.
</li>
<li>
<a name="command:ctest_coverage"><b><code>ctest_coverage</code></b></a>: Collect coverage tool results.<br>
<pre> ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]<br> [LABELS label1 [label2 [...]]])<br></pre>
<p>Perform the coverage of the given build directory and stores results in Coverage.xml. The second argument is a variable that will hold value.<br><p>The LABELS option filters the coverage report to include only source files labeled with at least one of the labels specified.<br><p>The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.
</li>
<li>
<a name="command:ctest_empty_binary_directory"><b><code>ctest_empty_binary_directory</code></b></a>: empties the binary directory<br>
<pre> ctest_empty_binary_directory( directory )<br></pre>
<p>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.
</li>
<li>
<a name="command:ctest_memcheck"><b><code>ctest_memcheck</code></b></a>: Run tests with a dynamic analysis tool.<br>
<pre> ctest_memcheck([BUILD build_dir] [RETURN_VALUE res] [APPEND]<br> [START start number] [END end number]<br> [STRIDE stride number] [EXCLUDE exclude regex ]<br> [INCLUDE include regex] <br> [EXCLUDE_LABEL exclude regex] <br> [INCLUDE_LABEL label regex] <br> [PARALLEL_LEVEL level] )<br></pre>
<p>Tests the given build directory and stores results in MemCheck.xml. The second argument is a variable that will hold value. Optionally, you can specify the starting test number START, the ending test number END, the number of tests to skip between each test STRIDE, a regular expression for tests to run INCLUDE, or a regular expression for tests not to run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular expressions for tests to be included or excluded by the test property LABEL. PARALLEL_LEVEL should be set to a positive number representing the number of tests to be run in parallel.<br><p>The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.
</li>
<li>
<a name="command:ctest_read_custom_files"><b><code>ctest_read_custom_files</code></b></a>: read CTestCustom files.<br>
<pre> ctest_read_custom_files( directory ... )<br></pre>
<p>Read all the CTestCustom.ctest or CTestCustom.cmake files from the given directory.
</li>
<li>
<a name="command:ctest_run_script"><b><code>ctest_run_script</code></b></a>: runs a ctest -S script<br>
<pre> ctest_run_script([NEW_PROCESS] script_file_name script_file_name1 <br> script_file_name2 ... [RETURN_VALUE var])<br></pre>
<p>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.If RETURN_VALUE is specified the return value of the last script run will be put into var.
</li>
<li>
<a name="command:ctest_sleep"><b><code>ctest_sleep</code></b></a>: sleeps for some amount of time<br>
<pre> ctest_sleep( seconds )<br> ctest_sleep( time1 duration time2 )<br></pre>
<p>With one argument it will sleep for a given number of seconds. With three arguments it will wait for time2 - time1 - duration seconds.
</li>
<li>
<a name="command:ctest_start"><b><code>ctest_start</code></b></a>: Starts the testing for a given model<br>
<pre> ctest_start(Model [TRACK &lt;track&gt;] [source [binary]])<br></pre>
<p>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.
</li>
<li>
<a name="command:ctest_submit"><b><code>ctest_submit</code></b></a>: Submit results to a dashboard server.<br>
<pre> ctest_submit([PARTS ...] [FILES ...] [RETURN_VALUE res])<br></pre>
<p>By default all available parts are submitted if no PARTS or FILES are specified. The PARTS option lists a subset of parts to be submitted. Valid part names are:<br><pre> Start = nothing<br> Update = ctest_update results, in Update.xml<br> Configure = ctest_configure results, in Configure.xml<br> Build = ctest_build results, in Build.xml<br> Test = ctest_test results, in Test.xml<br> Coverage = ctest_coverage results, in Coverage.xml<br> MemCheck = ctest_memcheck results, in DynamicAnalysis.xml<br> Notes = Files listed by CTEST_NOTES_FILES, in Notes.xml<br> ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES<br> Submit = nothing<br></pre>
<p>The FILES option explicitly lists specific files to be submitted. Each individual file must exist at the time of the call.<br>
</li>
<li>
<a name="command:ctest_test"><b><code>ctest_test</code></b></a>: Run tests in the project build tree.<br>
<pre> ctest_test([BUILD build_dir] [APPEND]<br> [START start number] [END end number]<br> [STRIDE stride number] [EXCLUDE exclude regex ]<br> [INCLUDE include regex] [RETURN_VALUE res] <br> [EXCLUDE_LABEL exclude regex] <br> [INCLUDE_LABEL label regex] <br> [PARALLEL_LEVEL level]) <br></pre>
<p>Tests the given build directory and stores results in Test.xml. The second argument is a variable that will hold value. Optionally, you can specify the starting test number START, the ending test number END, the number of tests to skip between each test STRIDE, a regular expression for tests to run INCLUDE, or a regular expression for tests to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular expression for test to be included or excluded by the test property LABEL. PARALLEL_LEVEL should be set to a positive number representing the number of tests to be run in parallel.<br><p>The APPEND option marks results for append to those previously submitted to a dashboard server since the last ctest_start. Append semantics are defined by the dashboard server in use.
</li>
<li>
<a name="command:ctest_update"><b><code>ctest_update</code></b></a>: Update the work tree from version control.<br>
<pre> ctest_update([SOURCE source] [RETURN_VALUE res])<br></pre>
<p>Updates the given source directory and stores results in Update.xml. If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. The RETURN_VALUE option specifies a variable in which to store the result, which is the number of files updated or -1 on error.
</li>
<li>
<a name="command:else"><b><code>else</code></b></a>: Starts the else portion of an if block.<br>
<pre> else(expression)<br></pre>
<p>See the if command.
</li>
<li>
<a name="command:elseif"><b><code>elseif</code></b></a>: Starts the elseif portion of an if block.<br>
<pre> elseif(expression)<br></pre>
<p>See the if command.
</li>
<li>
<a name="command:endforeach"><b><code>endforeach</code></b></a>: Ends a list of commands in a FOREACH block.<br>
<pre> endforeach(expression)<br></pre>
<p>See the FOREACH command.
</li>
<li>
<a name="command:endfunction"><b><code>endfunction</code></b></a>: Ends a list of commands in a function block.<br>
<pre> endfunction(expression)<br></pre>
<p>See the function command.
</li>
<li>
<a name="command:endif"><b><code>endif</code></b></a>: Ends a list of commands in an if block.<br>
<pre> endif(expression)<br></pre>
<p>See the if command.
</li>
<li>
<a name="command:endmacro"><b><code>endmacro</code></b></a>: Ends a list of commands in a macro block.<br>
<pre> endmacro(expression)<br></pre>
<p>See the macro command.
</li>
<li>
<a name="command:endwhile"><b><code>endwhile</code></b></a>: Ends a list of commands in a while block.<br>
<pre> endwhile(expression)<br></pre>
<p>See the while command.
</li>
<li>
<a name="command:exec_program"><b><code>exec_program</code></b></a>: Deprecated. Use the execute_process() command instead.<br>
<p>Run an executable program during the processing of the CMakeList.txt file.<br><pre> exec_program(Executable [directory in which to run]<br> [ARGS &lt;arguments to executable&gt;]<br> [OUTPUT_VARIABLE &lt;var&gt;]<br> [RETURN_VALUE &lt;var&gt;])<br></pre>
<p>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.<br>
</li>
<li>
<a name="command:execute_process"><b><code>execute_process</code></b></a>: Execute one or more child processes.<br>
<pre> execute_process(COMMAND &lt;cmd1&gt; [args1...]]<br> [COMMAND &lt;cmd2&gt; [args2...] [...]]<br> [WORKING_DIRECTORY &lt;directory&gt;]<br> [TIMEOUT &lt;seconds&gt;]<br> [RESULT_VARIABLE &lt;variable&gt;]<br> [OUTPUT_VARIABLE &lt;variable&gt;]<br> [ERROR_VARIABLE &lt;variable&gt;]<br> [INPUT_FILE &lt;file&gt;]<br> [OUTPUT_FILE &lt;file&gt;]<br> [ERROR_FILE &lt;file&gt;]<br> [OUTPUT_QUIET]<br> [ERROR_QUIET]<br> [OUTPUT_STRIP_TRAILING_WHITESPACE]<br> [ERROR_STRIP_TRAILING_WHITESPACE])<br></pre>
<p>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.<br><p>The execute_process command is a newer more powerful version of exec_program, but the old command has been kept for compatibility.
</li>
<li>
<a name="command:file"><b><code>file</code></b></a>: File manipulation command.<br>
<pre> file(WRITE filename "message to write"... )<br> file(APPEND filename "message to write"... )<br> file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])<br> file(STRINGS filename variable [LIMIT_COUNT num]<br> [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]<br> [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]<br> [NEWLINE_CONSUME] [REGEX regex]<br> [NO_HEX_CONVERSION])<br> file(GLOB variable [RELATIVE path] [globbing expressions]...)<br> file(GLOB_RECURSE variable [RELATIVE path] <br> [FOLLOW_SYMLINKS] [globbing expressions]...)<br> file(RENAME &lt;oldname&gt; &lt;newname&gt;)<br> file(REMOVE [file1 ...])<br> file(REMOVE_RECURSE [file1 ...])<br> file(MAKE_DIRECTORY [directory1 directory2 ...])<br> file(RELATIVE_PATH variable directory file)<br> file(TO_CMAKE_PATH path result)<br> file(TO_NATIVE_PATH path result)<br> file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log])<br></pre>
<p>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.<br><p>APPEND will write a message into a file same as WRITE, except it will append it to the end of the file<br><p>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.<br><p>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.<br><p>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.<br><p>REGEX specifies a regular expression that a string must match to be returned. Typical usage <br><pre> file(STRINGS myfile.txt myfile)<br></pre>
<p>stores a list in the variable "myfile" in which each item is a line from the input file.<br><p>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.<br><p>Examples of globbing expressions include:<br><pre> *.cxx - match all files with extension cxx<br> *.vt? - match all files with extension vta,...,vtz<br> f[3-5].txt - match files f3.txt, f4.txt, f5.txt<br></pre>
<p>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.<br><p>Examples of recursive globbing include:<br><pre> /dir/*.py - match all python files in /dir and subdirectories<br></pre>
<p>MAKE_DIRECTORY will create the given directories, also if their parent directories don't exist yet<br><p>RENAME moves a file or directory within a filesystem, replacing the destination atomically.<br><p>REMOVE will remove the given files, also in subdirectories<br><p>REMOVE_RECURSE will remove the given files and directories, also non-empty directories<br><p>RELATIVE_PATH will determine relative path from directory to the given file.<br><p>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.<br><p>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.<br><p>DOWNLOAD will download the given 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 should be specified as an integer.<br><p>The file() command also provides COPY and INSTALL signatures:<br><pre> file(&lt;COPY|INSTALL&gt; files... DESTINATION &lt;dir&gt;<br> [FILE_PERMISSIONS permissions...]<br> [DIRECTORY_PERMISSIONS permissions...]<br> [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]<br> [FILES_MATCHING]<br> [[PATTERN &lt;pattern&gt; | REGEX &lt;regex&gt;]<br> [EXCLUDE] [PERMISSIONS permissions...]] [...])<br></pre>
<p>The COPY signature copies files, directories, and symlinks to a destination folder. Relative input paths are evaluated with respect to the current source directory, and a relative destination is evaluated with respect to the current build directory. Copying preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp. Copying preserves input permissions unless explicit permissions or NO_SOURCE_PERMISSIONS are given (default is USE_SOURCE_PERMISSIONS). See the install(DIRECTORY) command for documentation of permissions, PATTERN, REGEX, and EXCLUDE options. <br><p>The INSTALL signature differs slightly from COPY: it prints status messages, and NO_SOURCE_PERMISSIONS is default. Installation scripts generated by the install() command use this signature (with some undocumented options for internal use).
</li>
<li>
<a name="command:find_file"><b><code>find_file</code></b></a>: Find the full path to a file.<br>
<pre> find_file(&lt;VAR&gt; name1 [path1 path2 ...])<br></pre>
<p>This is the short-hand signature for the command that is sufficient in many cases. It is the same as find_file(&lt;VAR&gt; name1 [PATHS path1 path2 ...])<br><pre> find_file(<br> &lt;VAR&gt;<br> name | NAMES name1 [name2 ...]<br> [HINTS path1 [path2 ... ENV var]]<br> [PATHS path1 [path2 ... ENV var]]<br> [PATH_SUFFIXES suffix1 [suffix2 ...]]<br> [DOC "cache documentation string"]<br> [NO_DEFAULT_PATH]<br> [NO_CMAKE_ENVIRONMENT_PATH]<br> [NO_CMAKE_PATH]<br> [NO_SYSTEM_ENVIRONMENT_PATH]<br> [NO_CMAKE_SYSTEM_PATH]<br> [CMAKE_FIND_ROOT_PATH_BOTH |<br> ONLY_CMAKE_FIND_ROOT_PATH |<br> NO_CMAKE_FIND_ROOT_PATH]<br> )<br></pre>
<p>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_file is invoked with the same variable. The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument. Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.<br><p>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:<br><p>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.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_INCLUDE_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_INCLUDE_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><p>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.<br><pre> PATH<br> INCLUDE<br></pre>
<p>5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH<br> CMAKE_SYSTEM_INCLUDE_PATH<br> CMAKE_SYSTEM_FRAMEWORK_PATH<br></pre>
<p>6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.<br><p>On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:<br><pre> "FIRST" - Try to find frameworks before standard<br> libraries or headers. This is the default on Darwin.<br> "LAST" - Try to find frameworks after standard<br> libraries or headers.<br> "ONLY" - Only try to find frameworks.<br> "NEVER" - Never try to find frameworks.<br></pre>
<p>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:<br><pre> "FIRST" - Try to find application bundles before standard<br> programs. This is the default on Darwin.<br> "LAST" - Try to find application bundles after standard<br> programs.<br> "ONLY" - Only try to find application bundles.<br> "NEVER" - Never try to find application bundles.<br></pre>
<p>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.<br><p>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:<br><pre> find_file(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)<br> find_file(&lt;VAR&gt; NAMES name)<br></pre>
<p>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</li>
<li>
<a name="command:find_library"><b><code>find_library</code></b></a>: Find a library.<br>
<pre> find_library(&lt;VAR&gt; name1 [path1 path2 ...])<br></pre>
<p>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 ...])<br><pre> find_library(<br> &lt;VAR&gt;<br> name | NAMES name1 [name2 ...]<br> [HINTS path1 [path2 ... ENV var]]<br> [PATHS path1 [path2 ... ENV var]]<br> [PATH_SUFFIXES suffix1 [suffix2 ...]]<br> [DOC "cache documentation string"]<br> [NO_DEFAULT_PATH]<br> [NO_CMAKE_ENVIRONMENT_PATH]<br> [NO_CMAKE_PATH]<br> [NO_SYSTEM_ENVIRONMENT_PATH]<br> [NO_CMAKE_SYSTEM_PATH]<br> [CMAKE_FIND_ROOT_PATH_BOTH |<br> ONLY_CMAKE_FIND_ROOT_PATH |<br> NO_CMAKE_FIND_ROOT_PATH]<br> )<br></pre>
<p>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 specifies additional subdirectories to check below each search path.<br><p>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:<br><p>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.<br><pre> &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_LIBRARY_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><pre> &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_LIBRARY_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><p>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.<br><pre> PATH<br> LIB<br></pre>
<p>5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.<br><pre> &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH<br> CMAKE_SYSTEM_LIBRARY_PATH<br> CMAKE_SYSTEM_FRAMEWORK_PATH<br></pre>
<p>6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.<br><p>On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:<br><pre> "FIRST" - Try to find frameworks before standard<br> libraries or headers. This is the default on Darwin.<br> "LAST" - Try to find frameworks after standard<br> libraries or headers.<br> "ONLY" - Only try to find frameworks.<br> "NEVER" - Never try to find frameworks.<br></pre>
<p>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:<br><pre> "FIRST" - Try to find application bundles before standard<br> programs. This is the default on Darwin.<br> "LAST" - Try to find application bundles after standard<br> programs.<br> "ONLY" - Only try to find application bundles.<br> "NEVER" - Never try to find application bundles.<br></pre>
<p>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.<br><p>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:<br><pre> find_library(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)<br> find_library(&lt;VAR&gt; NAMES name)<br></pre>
<p>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.<br><p>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.
</li>
<li>
<a name="command:find_package"><b><code>find_package</code></b></a>: Load settings for an external project.<br>
<pre> find_package(&lt;package&gt; [version] [EXACT] [QUIET]<br> [[REQUIRED|COMPONENTS] [components...]]<br> [NO_POLICY_SCOPE])<br></pre>
<p>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. If no [version] is given to a recursive invocation inside a find-module, the [version] and EXACT arguments are forwarded automatically from the outer call. Version support is currently provided only on a package-by-package basis (details below).<br><p>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.<br><p>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.<br><p>The complete Config mode command signature is:<br><pre> find_package(&lt;package&gt; [version] [EXACT] [QUIET]<br> [[REQUIRED|COMPONENTS] [components...]] [NO_MODULE]<br> [NO_POLICY_SCOPE]<br> [NAMES name1 [name2 ...]]<br> [CONFIGS config1 [config2 ...]]<br> [HINTS path1 [path2 ... ]]<br> [PATHS path1 [path2 ... ]]<br> [PATH_SUFFIXES suffix1 [suffix2 ...]]<br> [NO_DEFAULT_PATH]<br> [NO_CMAKE_ENVIRONMENT_PATH]<br> [NO_CMAKE_PATH]<br> [NO_SYSTEM_ENVIRONMENT_PATH]<br> [NO_CMAKE_PACKAGE_REGISTRY]<br> [NO_CMAKE_BUILDS_PATH]<br> [NO_CMAKE_SYSTEM_PATH]<br> [CMAKE_FIND_ROOT_PATH_BOTH |<br> ONLY_CMAKE_FIND_ROOT_PATH |<br> NO_CMAKE_FIND_ROOT_PATH])<br></pre>
<p>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. <br><p>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.<br><p>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 CMake will ignore it and search from scratch.<br><p>When the [version] argument is given Config mode will only find a version of the package that claims compatibility with the requested version (format is major[.minor[.patch[.tweak]]]). If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found. CMake does not establish any convention for the meaning of version numbers. Package version numbers are checked by "version" files provided by the packages themselves. For a candidate package configuration file "&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:<br><pre> PACKAGE_FIND_NAME = the &lt;package&gt; name<br> PACKAGE_FIND_VERSION = full requested version string<br> PACKAGE_FIND_VERSION_MAJOR = major version if requested, else 0<br> PACKAGE_FIND_VERSION_MINOR = minor version if requested, else 0<br> PACKAGE_FIND_VERSION_PATCH = patch version if requested, else 0<br> PACKAGE_FIND_VERSION_TWEAK = tweak version if requested, else 0<br> PACKAGE_FIND_VERSION_COUNT = number of version components, 0 to 4<br></pre>
<p>The version file checks whether it satisfies the requested version and sets these variables:<br><pre> PACKAGE_VERSION = full provided version string<br> PACKAGE_VERSION_EXACT = true if version is exact match<br> PACKAGE_VERSION_COMPATIBLE = true if version is compatible<br> PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version<br></pre>
<p>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:<br><pre> &lt;package&gt;_VERSION = full provided version string<br> &lt;package&gt;_VERSION_MAJOR = major version if provided, else 0<br> &lt;package&gt;_VERSION_MINOR = minor version if provided, else 0<br> &lt;package&gt;_VERSION_PATCH = patch version if provided, else 0<br> &lt;package&gt;_VERSION_TWEAK = tweak version if provided, else 0<br> &lt;package&gt;_VERSION_COUNT = number of version components, 0 to 4<br></pre>
<p>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.<br><p>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<br><pre> find_package(&lt;package&gt; [major[.minor]] [EXACT] [REQUIRED|QUIET])<br></pre>
<p>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.<br><p>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.<br><pre> &lt;prefix&gt;/ (W)<br> &lt;prefix&gt;/(cmake|CMake)/ (W)<br> &lt;prefix&gt;/&lt;name&gt;*/ (W)<br> &lt;prefix&gt;/&lt;name&gt;*/(cmake|CMake)/ (W)<br> &lt;prefix&gt;/(share|lib)/cmake/&lt;name&gt;*/ (U)<br> &lt;prefix&gt;/(share|lib)/&lt;name&gt;*/ (U)<br> &lt;prefix&gt;/(share|lib)/&lt;name&gt;*/(cmake|CMake)/ (U)<br></pre>
<p>On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:<br><pre> &lt;prefix&gt;/&lt;name&gt;.framework/Resources/ (A)<br> &lt;prefix&gt;/&lt;name&gt;.framework/Resources/CMake/ (A)<br> &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/ (A)<br> &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/CMake/ (A)<br> &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/ (A)<br> &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/CMake/ (A)<br></pre>
<p>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.<br><p>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.<br><p>The set of installation prefixes is constructed using the following steps. If NO_DEFAULT_PATH is specified all NO_* options are enabled.<br><p>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.<br><pre> CMAKE_PREFIX_PATH<br> CMAKE_FRAMEWORK_PATH<br> CMAKE_APPBUNDLE_PATH<br></pre>
<p>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.<br><pre> CMAKE_PREFIX_PATH<br> CMAKE_FRAMEWORK_PATH<br> CMAKE_APPBUNDLE_PATH<br></pre>
<p>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.<br><p>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.<br><pre> PATH<br></pre>
<p>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.<br><p>6. Search paths stored in the CMake user package registry. This can be skipped if NO_CMAKE_PACKAGE_REGISTRY is passed. Paths are stored in the registry when CMake configures a project that invokes export(PACKAGE &lt;name&gt;). See the export(PACKAGE) command documentation for more details.<br><p>7. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.<br><pre> CMAKE_SYSTEM_PREFIX_PATH<br> CMAKE_SYSTEM_FRAMEWORK_PATH<br> CMAKE_SYSTEM_APPBUNDLE_PATH<br></pre>
<p>8. Search paths specified by the PATHS option. These are typically hard-coded guesses.<br><p>On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:<br><pre> "FIRST" - Try to find frameworks before standard<br> libraries or headers. This is the default on Darwin.<br> "LAST" - Try to find frameworks after standard<br> libraries or headers.<br> "ONLY" - Only try to find frameworks.<br> "NEVER" - Never try to find frameworks.<br></pre>
<p>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:<br><pre> "FIRST" - Try to find application bundles before standard<br> programs. This is the default on Darwin.<br> "LAST" - Try to find application bundles after standard<br> programs.<br> "ONLY" - Only try to find application bundles.<br> "NEVER" - Never try to find application bundles.<br></pre>
<p>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.<br><p>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:<br><pre> find_package(&lt;package&gt; PATHS paths... NO_DEFAULT_PATH)<br> find_package(&lt;package&gt;)<br></pre>
<p>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.<br><p>See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.
</li>
<li>
<a name="command:find_path"><b><code>find_path</code></b></a>: Find the directory containing a file.<br>
<pre> find_path(&lt;VAR&gt; name1 [path1 path2 ...])<br></pre>
<p>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 ...])<br><pre> find_path(<br> &lt;VAR&gt;<br> name | NAMES name1 [name2 ...]<br> [HINTS path1 [path2 ... ENV var]]<br> [PATHS path1 [path2 ... ENV var]]<br> [PATH_SUFFIXES suffix1 [suffix2 ...]]<br> [DOC "cache documentation string"]<br> [NO_DEFAULT_PATH]<br> [NO_CMAKE_ENVIRONMENT_PATH]<br> [NO_CMAKE_PATH]<br> [NO_SYSTEM_ENVIRONMENT_PATH]<br> [NO_CMAKE_SYSTEM_PATH]<br> [CMAKE_FIND_ROOT_PATH_BOTH |<br> ONLY_CMAKE_FIND_ROOT_PATH |<br> NO_CMAKE_FIND_ROOT_PATH]<br> )<br></pre>
<p>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 specifies additional subdirectories to check below each search path.<br><p>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:<br><p>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.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_INCLUDE_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_INCLUDE_PATH<br> CMAKE_FRAMEWORK_PATH<br></pre>
<p>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.<br><p>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.<br><pre> PATH<br> INCLUDE<br></pre>
<p>5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.<br><pre> &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH<br> CMAKE_SYSTEM_INCLUDE_PATH<br> CMAKE_SYSTEM_FRAMEWORK_PATH<br></pre>
<p>6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.<br><p>On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:<br><pre> "FIRST" - Try to find frameworks before standard<br> libraries or headers. This is the default on Darwin.<br> "LAST" - Try to find frameworks after standard<br> libraries or headers.<br> "ONLY" - Only try to find frameworks.<br> "NEVER" - Never try to find frameworks.<br></pre>
<p>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:<br><pre> "FIRST" - Try to find application bundles before standard<br> programs. This is the default on Darwin.<br> "LAST" - Try to find application bundles after standard<br> programs.<br> "ONLY" - Only try to find application bundles.<br> "NEVER" - Never try to find application bundles.<br></pre>
<p>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.<br><p>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:<br><pre> find_path(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)<br> find_path(&lt;VAR&gt; NAMES name)<br></pre>
<p>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.<br><p>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.
</li>
<li>
<a name="command:find_program"><b><code>find_program</code></b></a>: Find an executable program.<br>
<pre> find_program(&lt;VAR&gt; name1 [path1 path2 ...])<br></pre>
<p>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 ...])<br><pre> find_program(<br> &lt;VAR&gt;<br> name | NAMES name1 [name2 ...]<br> [HINTS path1 [path2 ... ENV var]]<br> [PATHS path1 [path2 ... ENV var]]<br> [PATH_SUFFIXES suffix1 [suffix2 ...]]<br> [DOC "cache documentation string"]<br> [NO_DEFAULT_PATH]<br> [NO_CMAKE_ENVIRONMENT_PATH]<br> [NO_CMAKE_PATH]<br> [NO_SYSTEM_ENVIRONMENT_PATH]<br> [NO_CMAKE_SYSTEM_PATH]<br> [CMAKE_FIND_ROOT_PATH_BOTH |<br> ONLY_CMAKE_FIND_ROOT_PATH |<br> NO_CMAKE_FIND_ROOT_PATH]<br> )<br></pre>
<p>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 specifies additional subdirectories to check below each search path.<br><p>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:<br><p>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.<br><pre> &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_PROGRAM_PATH<br> CMAKE_APPBUNDLE_PATH<br></pre>
<p>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.<br><pre> &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH<br> CMAKE_PROGRAM_PATH<br> CMAKE_APPBUNDLE_PATH<br></pre>
<p>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.<br><p>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.<br><pre> PATH<br> <br></pre>
<p>5. Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.<br><pre> &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH<br> CMAKE_SYSTEM_PROGRAM_PATH<br> CMAKE_SYSTEM_APPBUNDLE_PATH<br></pre>
<p>6. Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.<br><p>On Darwin or systems supporting OS X Frameworks, the cmake variable CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:<br><pre> "FIRST" - Try to find frameworks before standard<br> libraries or headers. This is the default on Darwin.<br> "LAST" - Try to find frameworks after standard<br> libraries or headers.<br> "ONLY" - Only try to find frameworks.<br> "NEVER" - Never try to find frameworks.<br></pre>
<p>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:<br><pre> "FIRST" - Try to find application bundles before standard<br> programs. This is the default on Darwin.<br> "LAST" - Try to find application bundles after standard<br> programs.<br> "ONLY" - Only try to find application bundles.<br> "NEVER" - Never try to find application bundles.<br></pre>
<p>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.<br><p>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:<br><pre> find_program(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)<br> find_program(&lt;VAR&gt; NAMES name)<br></pre>
<p>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</li>
<li>
<a name="command:foreach"><b><code>foreach</code></b></a>: Evaluate a group of commands for each value in a list.<br>
<pre> foreach(loop_var arg1 arg2 ...)<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> endforeach(loop_var)<br></pre>
<p>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.<br><pre> foreach(loop_var RANGE total)<br> foreach(loop_var RANGE start stop [step])<br></pre>
<p>Foreach can also iterate over a generated range of numbers. There are three types of this iteration:<br><p>* When specifying single number, the range will have elements 0 to "total".<br><p>* When specifying two numbers, the range will have elements from the first number to the second number.<br><p>* The third optional number is the increment used to iterate from the first number to the second number.<br><pre> foreach(loop_var IN [LISTS [list1 [...]]]<br> [ITEMS [item1 [...]]])<br></pre>
<p>Iterates over a precise list of items. The LISTS option names list-valued variables to be traversed, including empty elements (an empty string is a zero-length list). The ITEMS option ends argument parsing and includes all arguments following it in the iteration.
</li>
<li>
<a name="command:function"><b><code>function</code></b></a>: Start recording a function for later invocation as a command.<br>
<pre> function(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> endfunction(&lt;name&gt;)<br></pre>
<p>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 past the last expected argument.<br><p>See the cmake_policy() command documentation for the behavior of policies inside functions.
</li>
<li>
<a name="command:get_cmake_property"><b><code>get_cmake_property</code></b></a>: Get a property of the CMake instance.<br>
<pre> get_cmake_property(VAR property)<br></pre>
<p>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.
</li>
<li>
<a name="command:get_directory_property"><b><code>get_directory_property</code></b></a>: Get a property of DIRECTORY scope.<br>
<pre> get_directory_property(&lt;variable&gt; [DIRECTORY &lt;dir&gt;] &lt;prop-name&gt;)<br></pre>
<p>Store a property of directory scope in the named variable. If the property is not defined the empty-string is returned. The DIRECTORY argument specifies another directory from which to retrieve the property value. The specified directory must have already been traversed by CMake.<br><pre> get_directory_property(&lt;variable&gt; [DIRECTORY &lt;dir&gt;]<br> DEFINITION &lt;var-name&gt;)<br></pre>
<p>Get a variable definition from a directory. This form is useful to get a variable definition from another directory.
</li>
<li>
<a name="command:get_filename_component"><b><code>get_filename_component</code></b></a>: Get a specific component of a full filename.<br>
<pre> get_filename_component(VarName FileName<br> PATH|ABSOLUTE|NAME|EXT|NAME_WE|REALPATH<br> [CACHE])<br></pre>
<p>Set VarName to be the path (PATH), file name (NAME), file extension (EXT), file name without extension (NAME_WE) of FileName, the full path (ABSOLUTE), or the full path with all symlinks resolved (REALPATH). 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.<br><pre> get_filename_component(VarName FileName<br> PROGRAM [PROGRAM_ARGS ArgVar]<br> [CACHE])<br></pre>
<p>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.
</li>
<li>
<a name="command:get_property"><b><code>get_property</code></b></a>: Get a property.<br>
<pre> get_property(&lt;variable&gt;<br> &lt;GLOBAL |<br> DIRECTORY [dir] |<br> TARGET &lt;target&gt; |<br> SOURCE &lt;source&gt; |<br> TEST &lt;test&gt; |<br> CACHE &lt;entry&gt; |<br> VARIABLE&gt;<br> PROPERTY &lt;name&gt;<br> [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])<br></pre>
<p>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:<br><p>GLOBAL scope is unique and does not accept a name.<br><p>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.<br><p>TARGET scope must name one existing target.<br><p>SOURCE scope must name one source file.<br><p>TEST scope must name one existing test.<br><p>CACHE scope must name one cache entry.<br><p>VARIABLE scope is unique and does not accept a name.<br><p>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.
</li>
<li>
<a name="command:if"><b><code>if</code></b></a>: Conditionally execute a group of commands.<br>
<pre> if(expression)<br> # then section.<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> elseif(expression2)<br> # elseif section.<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> else(expression)<br> # else section.<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> endif(expression)<br></pre>
<p>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 expression in the else and endif clause is optional. Long expressions can be used and there is a traditional order of precedence. Parenthetical expressions are evaluated first followed by unary operators such as EXISTS, COMMAND, and DEFINED. 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:<br><pre> if(&lt;constant&gt;)<br></pre>
<p>True if the constant is 1, ON, YES, TRUE, Y, or a non-zero number. False if the constant is 0, OFF, NO, FALSE, N, IGNORE, "", or ends in the suffix '-NOTFOUND'. Named boolean constants are case-insensitive.<br><pre> if(&lt;variable&gt;)<br></pre>
<p>True if the variable's value is not a false constant.<br><pre> if(NOT &lt;expression&gt;)<br></pre>
<p>True if the expression is not true.<br><pre> if(&lt;expr1&gt; AND &lt;expr2&gt;)<br></pre>
<p>True if both expressions would be considered true individually.<br><pre> if(&lt;expr1&gt; OR &lt;expr2&gt;)<br></pre>
<p>True if either expression would be considered true individually.<br><pre> if(COMMAND command-name)<br></pre>
<p>True if the given name is a command, macro or function that can be invoked.<br><pre> if(POLICY policy-id)<br></pre>
<p>True if the given name is an existing policy (of the form CMP&lt;NNNN&gt;).<br><pre> if(TARGET target-name)<br></pre>
<p>True if the given name is an existing target, built or imported.<br><pre> if(EXISTS file-name)<br> if(EXISTS directory-name)<br></pre>
<p>True if the named file or directory exists. Behavior is well-defined only for full paths.<br><pre> if(file1 IS_NEWER_THAN file2)<br></pre>
<p>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.<br><pre> if(IS_DIRECTORY directory-name)<br></pre>
<p>True if the given name is a directory. Behavior is well-defined only for full paths.<br><pre> if(IS_ABSOLUTE path)<br></pre>
<p>True if the given path is an absolute path.<br><pre> if(variable MATCHES regex)<br> if(string MATCHES regex)<br></pre>
<p>True if the given string or variable's value matches the given regular expression.<br><pre> if(variable LESS number)<br> if(string LESS number)<br> if(variable GREATER number)<br> if(string GREATER number)<br> if(variable EQUAL number)<br> if(string EQUAL number)<br></pre>
<p>True if the given string or variable's value is a valid number and the inequality or equality is true.<br><pre> if(variable STRLESS string)<br> if(string STRLESS string)<br> if(variable STRGREATER string)<br> if(string STRGREATER string)<br> if(variable STREQUAL string)<br> if(string STREQUAL string)<br></pre>
<p>True if the given string or variable's value is lexicographically less (or greater, or equal) than the string or variable on the right.<br><pre> if(version1 VERSION_LESS version2)<br> if(version1 VERSION_EQUAL version2)<br> if(version1 VERSION_GREATER version2)<br></pre>
<p>Component-wise integer version number comparison (version format is major[.minor[.patch[.tweak]]]).<br><pre> if(DEFINED variable)<br></pre>
<p>True if the given variable is defined. It does not matter if the variable is true or false just if it has been set.<br><pre> if((expression) AND (expression OR (expression)))<br></pre>
<p>The expressions inside the parenthesis are evaluated first and then the remaining expression is evaluated as in the previous examples. Where there are nested parenthesis the innermost are evaluated as part of evaluating the expression that contains them.<br><p>The if statement was written fairly early in CMake's history and it has some convenience features that are worth covering. The if statement reduces operations until there is a single remaining value, at that point if the case insensitive value is: ON, 1, YES, TRUE, Y it returns true, if it is OFF, 0, NO, FALSE, N, NOTFOUND, *-NOTFOUND, IGNORE it will return false. <br><p>This is fairly reasonable. The convenience feature that sometimes throws new authors is how CMake handles values that do not match the true or false list. Those values are treated as variables and are dereferenced even though they do not have the required ${} syntax. This means that if you write<br><pre> if (boobah)<br></pre>
<p>CMake will treat it as if you wrote <br><pre> if (${boobah})<br></pre>
<p>likewise if you write <br><pre> if (fubar AND sol)<br></pre>
<p>CMake will conveniently treat it as <br><pre> if ("${fubar}" AND "${sol}")<br></pre>
<p>The later is really the correct way to write it, but the former will work as well. Only some operations in the if statement have this special handling of arguments. The specific details follow: <br><p>1) The left hand argument to MATCHES is first checked to see if it is a defined variable, if so the variable's value is used, otherwise the original value is used. <br><p>2) If the left hand argument to MATCHES is missing it returns false without error <br><p>3) Both left and right hand arguments to LESS GREATER EQUAL are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. <br><p>4) Both left and right hand arguments to STRLESS STREQUAL STRGREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. <br><p>5) Both left and right hand argumemnts to VERSION_LESS VERSION_EQUAL VERSION_GREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. <br><p>6) The right hand argument to NOT is tested to see if it is a boolean constant, if so the value is used, otherwise it is assumed to be a variable and it is dereferenced. <br><p>7) The left and right hand arguments to AND OR are independently tested to see if they are boolean constants, if so they are used as such, otherwise they are assumed to be variables and are dereferenced. <br>
</li>
<li>
<a name="command:include"><b><code>include</code></b></a>: Read CMake listfile code from the given file.<br>
<pre> include(&lt;file|module&gt; [OPTIONAL] [RESULT_VARIABLE &lt;VAR&gt;]<br> [NO_POLICY_SCOPE])<br></pre>
<p>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.<br><p>If a module is specified instead of a file, the file with name &lt;modulename&gt;.cmake is searched in the CMAKE_MODULE_PATH.<br><p>See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.
</li>
<li>
<a name="command:list"><b><code>list</code></b></a>: List operations.<br>
<pre> list(LENGTH &lt;list&gt; &lt;output variable&gt;)<br> list(GET &lt;list&gt; &lt;element index&gt; [&lt;element index&gt; ...]<br> &lt;output variable&gt;)<br> list(APPEND &lt;list&gt; &lt;element&gt; [&lt;element&gt; ...])<br> list(FIND &lt;list&gt; &lt;value&gt; &lt;output variable&gt;)<br> list(INSERT &lt;list&gt; &lt;element_index&gt; &lt;element&gt; [&lt;element&gt; ...])<br> list(REMOVE_ITEM &lt;list&gt; &lt;value&gt; [&lt;value&gt; ...])<br> list(REMOVE_AT &lt;list&gt; &lt;index&gt; [&lt;index&gt; ...])<br> list(REMOVE_DUPLICATES &lt;list&gt;)<br> list(REVERSE &lt;list&gt;)<br> list(SORT &lt;list&gt;)<br></pre>
<p>LENGTH will return a given list's length.<br><p>GET will return list of elements specified by indices from the list.<br><p>APPEND will append elements to the list.<br><p>FIND will return the index of the element specified in the list or -1 if it wasn't found.<br><p>INSERT will insert elements to the list to the specified location.<br><p>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.<br><p>REMOVE_DUPLICATES will remove duplicated items in the list.<br><p>REVERSE reverses the contents of the list in-place.<br><p>SORT sorts the list in-place alphabetically.<br><p>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.<br><p>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.<br>
</li>
<li>
<a name="command:macro"><b><code>macro</code></b></a>: Start recording a macro for later invocation as a command.<br>
<pre> macro(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> endmacro(&lt;name&gt;)<br></pre>
<p>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 past 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.<br><p>See the cmake_policy() command documentation for the behavior of policies inside macros.
</li>
<li>
<a name="command:make_directory"><b><code>make_directory</code></b></a>: Deprecated. Use the file(MAKE_DIRECTORY ) command instead.<br>
<pre> make_directory(directory)<br></pre>
<p>Creates the specified directory. Full paths should be given. Any parent directories that do not exist will also be created. Use with care.
</li>
<li>
<a name="command:mark_as_advanced"><b><code>mark_as_advanced</code></b></a>: Mark cmake cached variables as advanced.<br>
<pre> mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)<br></pre>
<p>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.<br><p>It does nothing in script mode.
</li>
<li>
<a name="command:math"><b><code>math</code></b></a>: Mathematical expressions.<br>
<pre> math(EXPR &lt;output variable&gt; &lt;math expression&gt;)<br></pre>
<p>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.
</li>
<li>
<a name="command:message"><b><code>message</code></b></a>: Display a message to the user.<br>
<pre> message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]<br> "message to display" ...)<br></pre>
<p>The optional keyword determines the type of message:<br><pre> (none) = Important information<br> STATUS = Incidental information<br> WARNING = CMake Warning, continue processing<br> AUTHOR_WARNING = CMake Warning (dev), continue processing<br> SEND_ERROR = CMake Error, continue but skip generation<br> FATAL_ERROR = CMake Error, stop all processing<br></pre>
<p>The CMake command-line tool displays STATUS messages on stdout and all other message types on stderr. The CMake GUI displays all messages in its log area. The interactive dialogs (ccmake and CMakeSetup) show STATUS messages one at a time on a status line and other messages in interactive pop-up boxes.<br><p>CMake Warning and Error message text displays using a simple markup language. Non-indented text is formatted in line-wrapped paragraphs delimited by newlines. Indented text is considered pre-formatted.
</li>
<li>
<a name="command:option"><b><code>option</code></b></a>: Provides an option that the user can optionally select.<br>
<pre> option(&lt;option_variable&gt; "help string describing option"<br> [initial value])<br></pre>
<p>Provide an option for the user to select as ON or OFF. If no initial value is provided, OFF is used.
</li>
<li>
<a name="command:remove"><b><code>remove</code></b></a>: Deprecated. Use the list(REMOVE_ITEM ) command instead.<br>
<pre> remove(VAR VALUE VALUE ...)<br></pre>
<p>Removes VALUE from the variable VAR. This is typically used to remove entries from a vector (e.g. semicolon separated list). VALUE is expanded.
</li>
<li>
<a name="command:return"><b><code>return</code></b></a>: Return from a file, directory or function.<br>
<pre> return()<br></pre>
<p>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.
</li>
<li>
<a name="command:separate_arguments"><b><code>separate_arguments</code></b></a>: Parse space-separated arguments into a semicolon-separated list.<br>
<pre> separate_arguments(&lt;var&gt; &lt;UNIX|WINDOWS&gt;_COMMAND "&lt;args&gt;")<br></pre>
<p>Parses a unix- or windows-style command-line string "&lt;args&gt;" and stores a semicolon-separated list of the arguments in &lt;var&gt;. The entire command line must be given in one "&lt;args&gt;" argument.<br><p>The UNIX_COMMAND mode separates arguments by unquoted whitespace. It recognizes both single-quote and double-quote pairs. A backslash escapes the next literal character (\" is "); there are no special escapes (\n is just n).<br><p>The WINDOWS_COMMAND mode parses a windows command-line using the same syntax the runtime library uses to construct argv at startup. It separates arguments by whitespace that is not double-quoted. Backslashes are literal unless they precede double-quotes. See the MSDN article "Parsing C Command-Line Arguments" for details.<br><pre> separate_arguments(VARIABLE)<br></pre>
<p>Convert the value of VARIABLE to a semi-colon separated list. All spaces are replaced with ';'. This helps with generating command lines.
</li>
<li>
<a name="command:set"><b><code>set</code></b></a>: Set a CMAKE variable to a given value.<br>
<pre> set(&lt;variable&gt; &lt;value&gt;<br> [[CACHE &lt;type&gt; &lt;docstring&gt; [FORCE]] | PARENT_SCOPE])<br></pre>
<p>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<br><pre> FILEPATH = File chooser dialog.<br> PATH = Directory chooser dialog.<br> STRING = Arbitrary string.<br> BOOL = Boolean ON/OFF checkbox.<br> INTERNAL = No GUI entry (used for persistent variables).<br></pre>
<p>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.<br><p>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).<br><p>If &lt;value&gt; is not specified then the variable is removed instead of set. See also: the unset() command.<br><pre> set(&lt;variable&gt; &lt;value1&gt; ... &lt;valueN&gt;)<br></pre>
<p>In this case &lt;variable&gt; is set to a semicolon separated list of values.<br><p>&lt;variable&gt; can be an environment variable such as:<br><pre> set( ENV{PATH} /home/martink )<br></pre>
<p>in which case the environment variable will be set.
</li>
<li>
<a name="command:set_directory_properties"><b><code>set_directory_properties</code></b></a>: Set a property of the directory.<br>
<pre> set_directory_properties(PROPERTIES prop1 value1 prop2 value2)<br></pre>
<p>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. ADDITIONAL_MAKE_CLEAN_FILES is a list of files that will be cleaned as a part of "make clean" stage.
</li>
<li>
<a name="command:set_property"><b><code>set_property</code></b></a>: Set a named property in a given scope.<br>
<pre> set_property(&lt;GLOBAL |<br> DIRECTORY [dir] |<br> TARGET [target1 [target2 ...]] |<br> SOURCE [src1 [src2 ...]] |<br> TEST [test1 [test2 ...]] |<br> CACHE [entry1 [entry2 ...]]&gt;<br> [APPEND]<br> PROPERTY &lt;name&gt; [value1 [value2 ...]])<br></pre>
<p>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:<br><p>GLOBAL scope is unique and does not accept a name.<br><p>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.<br><p>TARGET scope may name zero or more existing targets.<br><p>SOURCE scope may name zero or more source files.<br><p>TEST scope may name zero or more existing tests.<br><p>CACHE scope must name zero or more cache existing entries.<br><p>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.
</li>
<li>
<a name="command:site_name"><b><code>site_name</code></b></a>: Set the given variable to the name of the computer.<br>
<pre> site_name(variable)<br></pre>
</li>
<li>
<a name="command:string"><b><code>string</code></b></a>: String operations.<br>
<pre> string(REGEX MATCH &lt;regular_expression&gt;<br> &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])<br> string(REGEX MATCHALL &lt;regular_expression&gt;<br> &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])<br> string(REGEX REPLACE &lt;regular_expression&gt;<br> &lt;replace_expression&gt; &lt;output variable&gt;<br> &lt;input&gt; [&lt;input&gt;...])<br> string(REPLACE &lt;match_string&gt;<br> &lt;replace_string&gt; &lt;output variable&gt;<br> &lt;input&gt; [&lt;input&gt;...])<br> string(COMPARE EQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)<br> string(COMPARE NOTEQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)<br> string(COMPARE LESS &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)<br> string(COMPARE GREATER &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)<br> string(ASCII &lt;number&gt; [&lt;number&gt; ...] &lt;output variable&gt;)<br> string(CONFIGURE &lt;string1&gt; &lt;output variable&gt;<br> [@ONLY] [ESCAPE_QUOTES])<br> string(TOUPPER &lt;string1&gt; &lt;output variable&gt;)<br> string(TOLOWER &lt;string1&gt; &lt;output variable&gt;)<br> string(LENGTH &lt;string&gt; &lt;output variable&gt;)<br> string(SUBSTRING &lt;string&gt; &lt;begin&gt; &lt;length&gt; &lt;output variable&gt;)<br> string(STRIP &lt;string&gt; &lt;output variable&gt;)<br> string(RANDOM [LENGTH &lt;length&gt;] [ALPHABET &lt;alphabet&gt;]<br> [RANDOM_SEED &lt;seed&gt;] &lt;output variable&gt;)<br></pre>
<p>REGEX MATCH will match the regular expression once and store the match in the output variable.<br><p>REGEX MATCHALL will match the regular expression as many times as possible and store the matches in the output variable as a list.<br><p>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.<br><p>REPLACE will replace all occurrences of match_string in the input with replace_string and store the result in the output.<br><p>COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and store true or false in the output variable.<br><p>ASCII will convert all numbers into corresponding ASCII characters.<br><p>CONFIGURE will transform a string like CONFIGURE_FILE transforms a file.<br><p>TOUPPER/TOLOWER will convert string to upper/lower characters.<br><p>LENGTH will return a given string's length.<br><p>SUBSTRING will return a substring of a given string.<br><p>STRIP will return a substring of a given string with leading and trailing spaces removed.<br><p>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. If an integer RANDOM_SEED is given, its value will be used to seed the random number generator.<br><p>The following characters have special meaning in regular expressions:<br><pre> ^ Matches at beginning of a line<br> $ Matches at end of a line<br> . Matches any single character<br> [ ] Matches any character(s) inside the brackets<br> [^ ] Matches any character(s) not inside the brackets<br> - Matches any character in range on either side of a dash<br> * Matches preceding pattern zero or more times<br> + Matches preceding pattern one or more times<br> ? Matches preceding pattern zero or once only<br> | Matches a pattern on either side of the |<br> () Saves a matched subexpression, which can be referenced <br> in the REGEX REPLACE operation. Additionally it is saved<br> by all regular expression-related commands, including <br> e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9).</pre>
</li>
<li>
<a name="command:unset"><b><code>unset</code></b></a>: Unset a variable, cache variable, or environment variable.<br>
<pre> unset(&lt;variable&gt; [CACHE])<br></pre>
<p>Removes the specified variable causing it to become undefined. If CACHE is present then the variable is removed from the cache instead of the current scope.<br><p>&lt;variable&gt; can be an environment variable such as:<br><pre> unset(ENV{LD_LIBRARY_PATH})<br></pre>
<p>in which case the variable will be removed from the current environment.
</li>
<li>
<a name="command:variable_watch"><b><code>variable_watch</code></b></a>: Watch the CMake variable for change.<br>
<pre> variable_watch(&lt;variable name&gt; [&lt;command to execute&gt;])<br></pre>
<p>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;)
</li>
<li>
<a name="command:while"><b><code>while</code></b></a>: Evaluate a group of commands while a condition is true<br>
<pre> while(condition)<br> COMMAND1(ARGS ...)<br> COMMAND2(ARGS ...)<br> ...<br> endwhile(condition)<br></pre>
<p>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.
</li>
<li>
<a name="command:write_file"><b><code>write_file</code></b></a>: Deprecated. Use the file(WRITE ) command instead.<br>
<pre> write_file(filename "message to write"... [APPEND])<br></pre>
<p>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.<br><p>NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as this one but add some more functionality.<br><p>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.
</li>
</ul>
<h2><a name="section_Properties"/>Properties</h2>
<ul>
</ul>
<pre> CMake Properties - Properties supported by CMake, the Cross-Platform Makefile Generator.</pre>
<p>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.
<h2><a name="section_Compatibility Commands"/>Compatibility Commands</h2>
<ul>
</ul>
<pre> CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.</pre>
<p>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. ;-)
<h2><a name="section_Standard CMake Modules"/>Standard CMake Modules</h2>
<ul>
</ul>
<h2><a name="section_Copyright"/>Copyright</h2>
<ul>
</ul>
<p>Copyright 2000-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
<p>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<p>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.
<p>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<h2><a name="section_See Also"/>See Also</h2>
<ul>
<li><a href="#see:HomePage"><b><code>Home Page</code></b></a></li> <li><a href="#see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a></li> <li><a href="#see:OnlineDocumentation"><b><code>Online Documentation</code></b></a></li> <li><a href="#see:MailingList"><b><code>Mailing List</code></b></a></li></ul>
<p>The following resources are available to get help using CMake:
<ul>
<li>
<a name="see:HomePage"><b><code>Home Page</code></b></a>: <a href="http://www.cmake.org">http://www.cmake.org</a><br>
<p>The primary starting point for learning about CMake.
</li>
<li>
<a name="see:FrequentlyAskedQuestions"><b><code>Frequently Asked Questions</code></b></a>: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<p>A Wiki is provided containing answers to frequently asked questions.
</li>
<li>
<a name="see:OnlineDocumentation"><b><code>Online Documentation</code></b></a>: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br>
<p>Links to available documentation may be found on this web page.
</li>
<li>
<a name="see:MailingList"><b><code>Mailing List</code></b></a>: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br>
<p>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 <a href="http://www.cmake.org">http://www.cmake.org</a> before posting questions to the list.
</li>
</ul>
<p>Summary of helpful links:<br><pre> Home: <a href="http://www.cmake.org">http://www.cmake.org</a><br> Docs: <a href="http://www.cmake.org/HTML/Documentation.html">http://www.cmake.org/HTML/Documentation.html</a><br> Mail: <a href="http://www.cmake.org/HTML/MailingLists.html">http://www.cmake.org/HTML/MailingLists.html</a><br> FAQ: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br></pre>
</body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,297 @@
.TH cmakecompat 1 "November 13, 2009" "cmake 2.8.0"
.SH NAME
.PP
cmakecompat \- Reference of CMake compatibility commands.
.SH COMPATIBILITY COMMANDS
.PP
.nf
CMake Compatibility Listfile Commands \- Obsolete commands supported by CMake for compatibility.
.fi
.PP
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. ;\-)
.TP
.B build_name
Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.
.nf
build_name(variable)
.fi
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.
.TP
.B exec_program
Deprecated. Use the execute_process() command instead.
Run an executable program during the processing of the CMakeList.txt file.
.nf
exec_program(Executable [directory in which to run]
[ARGS <arguments to executable>]
[OUTPUT_VARIABLE <var>]
[RETURN_VALUE <var>])
.fi
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.
.TP
.B export_library_dependencies
Deprecated. Use INSTALL(EXPORT) or EXPORT command.
This command generates an old\-style library dependencies file. Projects requiring CMake 2.6 or later should not use the command. Use instead the install(EXPORT) command to help export targets from an installation tree and the export() command to export targets from a build tree.
The old\-style library dependencies file does not take into account per\-configuration names of libraries or the LINK_INTERFACE_LIBRARIES target property.
.nf
export_library_dependencies(<file> [APPEND])
.fi
Create a file named <file> that can be included into a CMake listfile with the INCLUDE command. The file will contain a number of SET commands that will set all the variables needed for library dependency information. This should be the last command in the top level CMakeLists.txt file of the project. If the APPEND option is specified, the SET commands will be appended to the given file instead of replacing it.
.TP
.B install_files
Deprecated. Use the install(FILES ) command instead.
This command has been superceded by the install command. It is provided for compatibility with older CMake code. The FILES form is directly replaced by the FILES form of the install command. The regexp form can be expressed more clearly using the GLOB form of the file command.
.nf
install_files(<dir> extension file file ...)
.fi
Create rules to install the listed files with the given extension into the given directory. Only files existing in the current source tree or its corresponding location in the binary tree may be listed. If a file specified already has an extension, that extension will be removed first. This is useful for providing lists of source files such as foo.cxx when you want the corresponding foo.h to be installed. A typical extension is '.h'.
.nf
install_files(<dir> regexp)
.fi
Any files in the current source directory that match the regular expression will be installed.
.nf
install_files(<dir> FILES file file ...)
.fi
Any files listed after the FILES keyword will be installed explicitly from the names given. Full paths are allowed in this form.
The directory <dir> is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX.
.TP
.B install_programs
Deprecated. Use the install(PROGRAMS ) command instead.
This command has been superceded by the install command. It is provided for compatibility with older CMake code. The FILES form is directly replaced by the PROGRAMS form of the INSTALL command. The regexp form can be expressed more clearly using the GLOB form of the FILE command.
.nf
install_programs(<dir> file1 file2 [file3 ...])
install_programs(<dir> FILES file1 [file2 ...])
.fi
Create rules to install the listed programs into the given directory. Use the FILES argument to guarantee that the file list version of the command will be used even when there is only one argument.
.nf
install_programs(<dir> regexp)
.fi
In the second form any program in the current source directory that matches the regular expression will be installed.
This command is intended to install programs that are not built by cmake, such as shell scripts. See the TARGETS form of the INSTALL command to create installation rules for targets built by cmake.
The directory <dir> is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX.
.TP
.B install_targets
Deprecated. Use the install(TARGETS ) command instead.
This command has been superceded by the install command. It is provided for compatibility with older CMake code.
.nf
install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
.fi
Create rules to install the listed targets into the given directory. The directory <dir> is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY is specified, then on systems with special runtime files (Windows DLL), the files will be copied to that directory.
.TP
.B link_libraries
Deprecated. Use the target_link_libraries() command instead.
Link libraries to all targets added later.
.nf
link_libraries(library1 <debug | optimized> library2 ...)
.fi
Specify a list of libraries to be linked into any following targets (typically added with the add_executable or add_library calls). This command is passed down to all subdirectories. The debug and optimized strings may be used to indicate that the next library listed is to be used only for that specific type of build.
.TP
.B make_directory
Deprecated. Use the file(MAKE_DIRECTORY ) command instead.
.nf
make_directory(directory)
.fi
Creates the specified directory. Full paths should be given. Any parent directories that do not exist will also be created. Use with care.
.TP
.B remove
Deprecated. Use the list(REMOVE_ITEM ) command instead.
.nf
remove(VAR VALUE VALUE ...)
.fi
Removes VALUE from the variable VAR. This is typically used to remove entries from a vector (e.g. semicolon separated list). VALUE is expanded.
.TP
.B subdir_depends
Deprecated. Does nothing.
.nf
subdir_depends(subdir dep1 dep2 ...)
.fi
Does not do anything. This command used to help projects order parallel builds correctly. This functionality is now automatic.
.TP
.B subdirs
Deprecated. Use the add_subdirectory() command instead.
Add a list of subdirectories to the build.
.nf
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
[PREORDER] )
.fi
Add a list of subdirectories to the build. The add_subdirectory command should be used instead of subdirs although subdirs will still work. This will cause any CMakeLists.txt files in the sub directories to be processed by CMake. Any directories after the PREORDER flag are traversed first by makefile builds, the PREORDER flag has no effect on IDE projects. Any directories after the EXCLUDE_FROM_ALL marker will not be included in the top level makefile or project file. This is useful for having CMake create makefiles or projects for a set of examples in a project. You would want CMake to generate makefiles or project files for all the examples at the same time, but you would not want them to show up in the top level project or be built each time make is run from the top.
.TP
.B use_mangled_mesa
Copy mesa headers for use in combination with system GL.
.nf
use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)
.fi
The path to mesa includes, should contain gl_mangle.h. The mesa headers are copied to the specified output directory. This allows mangled mesa headers to override other GL headers by being added to the include directory path earlier.
.TP
.B utility_source
Specify the source tree of a third\-party utility.
.nf
utility_source(cache_entry executable_name
path_to_source [file1 file2 ...])
.fi
When a third\-party utility's source is included in the distribution, this command specifies its location and name. The cache entry will not be set unless the path_to_source and all listed files exist. It is assumed that the source tree of the utility will have been built before it is needed.
When cross compiling CMake will print a warning if a utility_source() command is executed, because in many cases it is used to build an executable which is executed later on. This doesn't work when cross compiling, since the executable can run only on their target platform. So in this case the cache entry has to be adjusted manually so it points to an executable which is runnable on the build host.
.TP
.B variable_requires
Deprecated. Use the if() command instead.
Assert satisfaction of an option's required variables.
.nf
variable_requires(TEST_VARIABLE RESULT_VARIABLE
REQUIRED_VARIABLE1
REQUIRED_VARIABLE2 ...)
.fi
The first argument (TEST_VARIABLE) is the name of the variable to be tested, if that variable is false nothing else is done. If TEST_VARIABLE is true, then the next argument (RESULT_VARIABLE) is a variable that is set to true if all the required variables are set. The rest of the arguments are variables that must be true or not set to NOTFOUND to avoid an error. If any are not true, an error is reported.
.TP
.B write_file
Deprecated. Use the file(WRITE ) command instead.
.nf
write_file(filename "message to write"... [APPEND])
.fi
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.
NOTE 1: file(WRITE ... and file(APPEND ... do exactly the same as this one but add some more functionality.
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.
.SH COPYRIGHT
.PP
Copyright 2000\-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
.PP
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
.PP
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
.PP
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.
.PP
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
.PP
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.SH SEE ALSO
.PP
The following resources are available to get help using CMake:
.TP
.B Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
.TP
.B Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
.TP
.B Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
.TP
.B Mailing List
http://www.cmake.org/HTML/MailingLists.html
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 http://www.cmake.org before posting questions to the list.
.PP
Summary of helpful links:
.nf
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ
.fi

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,342 @@
.TH cmakepolicies 1 "November 13, 2009" "cmake 2.8.0"
.SH NAME
.PP
cmakepolicies \- Reference of CMake policies.
.SH DESCRIPTION
.PP
The "cmake" executable is the CMake command\-line interface. It may be used to configure projects in scripts. Project configuration settings may be specified on the command line with the \-D option. The \-i option will cause cmake to interactively prompt for such settings.
.PP
CMake is a cross\-platform build system generator. Projects specify their build process with platform\-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.
.SH POLICIES
.TP
.B CMP0000
A minimum required CMake version must be specified.
CMake requires that projects specify the version of CMake to which they have been written. This policy has been put in place so users trying to build the project may be told when they need to update their CMake. Specifying a version also helps the project build with CMake versions newer than that specified. Use the cmake_minimum_required command at the top of your main CMakeLists.txt file:
.nf
cmake_minimum_required(VERSION <major>.<minor>)
.fi
where "<major>.<minor>" is the version of CMake you want to support (such as "2.6"). The command will ensure that at least the given version of CMake is running and help newer versions be compatible with the project. See documentation of cmake_minimum_required for details.
Note that the command invocation must appear in the CMakeLists.txt file itself; a call in an included file is not sufficient. However, the cmake_policy command may be called to set policy CMP0000 to OLD or NEW behavior explicitly. The OLD behavior is to silently ignore the missing invocation. The NEW behavior is to issue an error instead of a warning. An included file may set CMP0000 explicitly to affect how this policy is enforced for the main CMakeLists.txt file.
This policy was introduced in CMake version 2.6.0.
.TP
.B CMP0001
CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
The OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present it to the user. The NEW behavior is to ignore CMAKE_BACKWARDS_COMPATIBILITY completely.
In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was used to request compatibility with earlier versions of CMake. In CMake 2.6 and above all compatibility issues are handled by policies and the cmake_policy command. However, CMake must still check CMAKE_BACKWARDS_COMPATIBILITY for projects written for CMake 2.4 and below.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0002
Logical target names must be globally unique.
Targets names created with add_executable, add_library, or add_custom_target are logical build target names. Logical target names must be globally unique because:
.nf
\- Unique names may be referenced unambiguously both in CMake
code and on make tool command lines.
\- Logical names are used by Xcode and VS IDE generators
to produce meaningful project names for the targets.
.fi
The logical name of executable and library targets does not have to correspond to the physical file names built. Consider using the OUTPUT_NAME target property to create two targets with the same physical name while keeping logical names distinct. Custom targets must simply have globally unique names (unless one uses the global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0003
Libraries linked via full path no longer produce linker search paths.
This policy affects how libraries whose full paths are NOT known are found at link time, but was created due to a change in how CMake deals with libraries whose full paths are known. Consider the code
.nf
target_link_libraries(myexe /path/to/libA.so)
.fi
CMake 2.4 and below implemented linking to libraries whose full paths are known by splitting them on the link line into separate components consisting of the linker search path and the library name. The example code might have produced something like
.nf
... \-L/path/to \-lA ...
.fi
in order to link to library A. An analysis was performed to order multiple link directories such that the linker would find library A in the desired location, but there are cases in which this does not work. CMake versions 2.6 and above use the more reliable approach of passing the full path to libraries directly to the linker in most cases. The example code now produces something like
.nf
... /path/to/libA.so ....
.fi
Unfortunately this change can break code like
.nf
target_link_libraries(myexe /path/to/libA.so B)
.fi
where "B" is meant to find "/path/to/libB.so". This code is wrong because the user is asking the linker to find library B but has not provided a linker search path (which may be added with the link_directories command). However, with the old linking implementation the code would work accidentally because the linker search path added for library A allowed library B to be found.
In order to support projects depending on linker search paths added by linking to libraries with known full paths, the OLD behavior for this policy will add the linker search paths even though they are not needed for their own libraries. When this policy is set to OLD, CMake will produce a link line such as
.nf
... \-L/path/to /path/to/libA.so \-lB ...
.fi
which will allow library B to be found as it was previously. When this policy is set to NEW, CMake will produce a link line such as
.nf
... /path/to/libA.so \-lB ...
.fi
which more accurately matches what the project specified.
The setting for this policy used when generating the link line is that in effect when the target is created by an add_executable or add_library command. For the example described above, the code
.nf
cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so B)
.fi
will work and suppress the warning for this policy. It may also be updated to work with the corrected linking approach:
.nf
cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)
link_directories(/path/to) # needed to find library B
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so B)
.fi
Even better, library B may be specified with a full path:
.nf
add_executable(myexe myexe.c)
target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)
.fi
When all items on the link line have known paths CMake does not check this policy so it has no effect.
Note that the warning for this policy will be issued for at most one target. This avoids flooding users with messages for every target when setting the policy once will probably fix all targets.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0004
Libraries linked may not have leading or trailing whitespace.
CMake versions 2.4 and below silently removed leading and trailing whitespace from libraries linked with code like
.nf
target_link_libraries(myexe " A ")
.fi
This could lead to subtle errors in user projects.
The OLD behavior for this policy is to silently remove leading and trailing whitespace. The NEW behavior for this policy is to diagnose the existence of such whitespace as an error. The setting for this policy used when checking the library names is that in effect when the target is created by an add_executable or add_library command.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0005
Preprocessor definition values are now escaped automatically.
This policy determines whether or not CMake should generate escaped preprocessor definition values added via add_definitions. CMake versions 2.4 and below assumed that only trivial values would be given for macros in add_definitions calls. It did not attempt to escape non\-trivial values such as string literals in generated build rules. CMake versions 2.6 and above support escaping of most values, but cannot assume the user has not added escapes already in an attempt to work around limitations in earlier versions.
The OLD behavior for this policy is to place definition values given to add_definitions directly in the generated build rules without attempting to escape anything. The NEW behavior for this policy is to generate correct escapes for all native build tools automatically. See documentation of the COMPILE_DEFINITIONS target property for limitations of the escaping implementation.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0006
Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.
This policy determines whether the install(TARGETS) command must be given a BUNDLE DESTINATION when asked to install a target with the MACOSX_BUNDLE property set. CMake 2.4 and below did not distinguish application bundles from normal executables when installing targets. CMake 2.6 provides a BUNDLE option to the install(TARGETS) command that specifies rules specific to application bundles on the Mac. Projects should use this option when installing a target with the MACOSX_BUNDLE property set.
The OLD behavior for this policy is to fall back to the RUNTIME DESTINATION if a BUNDLE DESTINATION is not given. The NEW behavior for this policy is to produce an error if a bundle target is installed without a BUNDLE DESTINATION.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0007
list command no longer ignores empty elements.
This policy determines whether the list command will ignore empty elements in the list. CMake 2.4 and below list commands ignored all empty elements in the list. For example, a;b;;c would have length 3 and not 4. The OLD behavior for this policy is to ignore empty list elements. The NEW behavior for this policy is to correctly count empty elements in a list.
This policy was introduced in CMake version 2.6.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0008
Libraries linked by full\-path must have a valid library file name.
In CMake 2.4 and below it is possible to write code like
.nf
target_link_libraries(myexe /full/path/to/somelib)
.fi
where "somelib" is supposed to be a valid library file name such as "libsomelib.a" or "somelib.lib". For Makefile generators this produces an error at build time because the dependency on the full path cannot be found. For VS IDE and Xcode generators this used to work by accident because CMake would always split off the library directory and ask the linker to search for the library by name (\-lsomelib or somelib.lib). Despite the failure with Makefiles, some projects have code like this and build only with VS and/or Xcode. This version of CMake prefers to pass the full path directly to the native build tool, which will fail in this case because it does not name a valid library file.
This policy determines what to do with full paths that do not appear to name a valid library file. The OLD behavior for this policy is to split the library name from the path and ask the linker to search for it. The NEW behavior for this policy is to trust the given path and pass it directly to the native build tool unchanged.
This policy was introduced in CMake version 2.6.1. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0009
FILE GLOB_RECURSE calls should not follow symlinks by default.
In CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow through symlinks, sometimes coming up with unexpectedly large result sets because of symlinks to top level directories that contain hundreds of thousands of files.
This policy determines whether or not to follow symlinks encountered during a FILE GLOB_RECURSE call. The OLD behavior for this policy is to follow the symlinks. The NEW behavior for this policy is not to follow the symlinks by default, but only if FOLLOW_SYMLINKS is given as an additional argument to the FILE command.
This policy was introduced in CMake version 2.6.2. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0010
Bad variable reference syntax is an error.
In CMake 2.6.2 and below, incorrect variable reference syntax such as a missing close\-brace ("${FOO") was reported but did not stop processing of CMake code. This policy determines whether a bad variable reference is an error. The OLD behavior for this policy is to warn about the error, leave the string untouched, and continue. The NEW behavior for this policy is to report an error.
This policy was introduced in CMake version 2.6.3. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0011
Included scripts do automatic cmake_policy PUSH and POP.
In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by the include() and find_package() commands would affect the includer. Explicit invocations of cmake_policy(PUSH) and cmake_policy(POP) were required to isolate policy changes and protect the includer. While some scripts intend to affect the policies of their includer, most do not. In CMake 2.6.3 and above, include() and find_package() by default PUSH and POP an entry on the policy stack around an included script, but provide a NO_POLICY_SCOPE option to disable it. This policy determines whether or not to imply NO_POLICY_SCOPE for compatibility. The OLD behavior for this policy is to imply NO_POLICY_SCOPE for include() and find_package() commands. The NEW behavior for this policy is to allow the commands to do their default cmake_policy PUSH and POP.
This policy was introduced in CMake version 2.6.3. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0012
if() recognizes numbers and boolean constants.
In CMake versions 2.6.4 and lower the if() command implicitly dereferenced arguments corresponding to variables, even those named like numbers or boolean constants, except for 0 and 1. Numbers and boolean constants such as true, false, yes, no, on, off, y, n, notfound, ignore (all case insensitive) were recognized in some cases but not all. For example, the code "if(TRUE)" might have evaluated as false. Numbers such as 2 were recognized only in boolean expressions like "if(NOT 2)" (leading to false) but not as a single\-argument like "if(2)" (also leading to false). Later versions of CMake prefer to treat numbers and boolean constants literally, so they should not be used as variable names.
The OLD behavior for this policy is to implicitly dereference variables named like numbers and boolean constants. The NEW behavior for this policy is to recognize numbers and boolean constants without dereferencing variables with such names.
This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0013
Duplicate binary directories are not allowed.
CMake 2.6.3 and below silently permitted add_subdirectory() calls to create the same binary directory multiple times. During build system generation files would be written and then overwritten in the build tree and could lead to strange behavior. CMake 2.6.4 and above explicitly detect duplicate binary directories. CMake 2.6.4 always considers this case an error. In CMake 2.8.0 and above this policy determines whether or not the case is an error. The OLD behavior for this policy is to allow duplicate binary directories. The NEW behavior for this policy is to disallow duplicate binary directories with an error.
This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.TP
.B CMP0014
Input directories must have CMakeLists.txt.
CMake versions before 2.8 silently ignored missing CMakeLists.txt files in directories referenced by add_subdirectory() or subdirs(), treating them as if present but empty. In CMake 2.8.0 and above this policy determines whether or not the case is an error. The OLD behavior for this policy is to silently ignore the problem. The NEW behavior for this policy is to report an error.
This policy was introduced in CMake version 2.8.0. CMake version 2.8.0 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly.
.SH COPYRIGHT
.PP
Copyright 2000\-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
.PP
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
.PP
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
.PP
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.
.PP
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
.PP
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.SH SEE ALSO
.PP
.B ccmake(1), cpack(1), ctest(1), cmakecommands(1), cmakecompat(1), cmakemodules(1), cmakeprops(1), cmakevars(1)
.PP
The following resources are available to get help using CMake:
.TP
.B Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
.TP
.B Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
.TP
.B Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
.TP
.B Mailing List
http://www.cmake.org/HTML/MailingLists.html
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 http://www.cmake.org before posting questions to the list.
.PP
Summary of helpful links:
.nf
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ
.fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,154 @@
.TH cpack 1 "November 13, 2009" "cpack 2.8.0"
.SH NAME
.PP
.nf
cpack \- Packaging driver provided by CMake.
.fi
.SH USAGE
.PP
.nf
cpack \-G <generator> [options]
.fi
.SH DESCRIPTION
.PP
The "cpack" executable is the CMake packaging program. CMake\-generated build trees created for projects that use the INSTALL_* commands have packaging support. This program will generate the package.
.PP
CMake is a cross\-platform build system generator. Projects specify their build process with platform\-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.
.SH OPTIONS
.TP
.B -G <generator>
Use the specified generator to generate package.
CPack may support multiple native packaging systems on certain platforms. A generator is responsible for generating input files for particular system and invoking that systems. Possible generator names are specified in the Generators section.
.TP
.B -C <Configuration>
Specify the project configuration
This option specifies the configuration that the project was build with, for example 'Debug', 'Release'.
.TP
.B -D <var>=<value>
Set a CPack variable.
Set a variable that can be used by the generator.
.TP
.B --config <config file>
Specify the config file.
Specify the config file to use to create the package. By default CPackConfig.cmake in the current directory will be used.
.SH GENERATORS
.TP
.B NSIS
Null Soft Installer
.TP
.B STGZ
Self extracting Tar GZip compression
.TP
.B TBZ2
Tar BZip2 compression
.TP
.B TGZ
Tar GZip compression
.TP
.B TZ
Tar Compress compression
.TP
.B ZIP
ZIP file format
.SH PROPERTIES
.PP
.nf
CMake Properties \- Properties supported by CMake, the Cross\-Platform Makefile Generator.
.fi
.PP
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.
.SH COMPATIBILITY COMMANDS
.PP
.nf
CMake Compatibility Listfile Commands \- Obsolete commands supported by CMake for compatibility.
.fi
.PP
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. ;\-)
.SH MODULES
.SH COPYRIGHT
.PP
Copyright 2000\-2009 Kitware, Inc., Insight Software Consortium. All rights reserved.
.PP
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
.PP
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
.PP
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.
.PP
Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.
.PP
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.SH SEE ALSO
.PP
.B cmake(1), ccmake(1)
.PP
The following resources are available to get help using CMake:
.TP
.B Home Page
http://www.cmake.org
The primary starting point for learning about CMake.
.TP
.B Frequently Asked Questions
http://www.cmake.org/Wiki/CMake_FAQ
A Wiki is provided containing answers to frequently asked questions.
.TP
.B Online Documentation
http://www.cmake.org/HTML/Documentation.html
Links to available documentation may be found on this web page.
.TP
.B Mailing List
http://www.cmake.org/HTML/MailingLists.html
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 http://www.cmake.org before posting questions to the list.
.PP
Summary of helpful links:
.nf
Home: http://www.cmake.org
Docs: http://www.cmake.org/HTML/Documentation.html
Mail: http://www.cmake.org/HTML/MailingLists.html
FAQ: http://www.cmake.org/Wiki/CMake_FAQ
.fi
.SH AUTHOR
.PP
This manual page was generated by the "\-\-help\-man" option.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
# - ADD_FILE_DEPENDENCIES(source_file depend_files...)
# Adds the given files as dependencies to source_file
#
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
MACRO(ADD_FILE_DEPENDENCIES _file)
GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
IF (_deps)
SET(_deps ${_deps} ${ARGN})
ELSE (_deps)
SET(_deps ${ARGN})
ENDIF (_deps)
SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
ENDMACRO(ADD_FILE_DEPENDENCIES)

View File

@ -0,0 +1,693 @@
# BundleUtilities.cmake
#
# A collection of CMake utility functions useful for dealing with .app bundles
# on the Mac and bundle-like directories on any OS.
#
# The following functions are provided by this script:
# get_bundle_main_executable
# get_dotapp_dir
# get_bundle_and_executable
# get_bundle_all_executables
# get_item_key
# clear_bundle_keys
# set_bundle_key_values
# get_bundle_keys
# copy_resolved_item_into_bundle
# fixup_bundle_item
# fixup_bundle
# copy_and_fixup_bundle
# verify_bundle_prerequisites
# verify_bundle_symlinks
# verify_app
#
# Requires CMake 2.6 or greater because it uses function, break and
# PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# The functions defined in this file depend on the get_prerequisites function
# (and possibly others) found in:
#
get_filename_component(BundleUtilities_cmake_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${BundleUtilities_cmake_dir}/GetPrerequisites.cmake")
# get_bundle_main_executable
#
# The result will be the full path name of the bundle's main executable file
# or an "error:" prefixed string if it could not be determined.
#
function(get_bundle_main_executable bundle result_var)
set(result "error: '${bundle}/Contents/Info.plist' file does not exist")
if(EXISTS "${bundle}/Contents/Info.plist")
set(result "error: no CFBundleExecutable in '${bundle}/Contents/Info.plist' file")
set(line_is_main_executable 0)
set(bundle_executable "")
# Read Info.plist as a list of lines:
#
set(eol_char "E")
file(READ "${bundle}/Contents/Info.plist" info_plist)
string(REGEX REPLACE ";" "\\\\;" info_plist "${info_plist}")
string(REGEX REPLACE "\n" "${eol_char};" info_plist "${info_plist}")
# Scan the lines for "<key>CFBundleExecutable</key>" - the line after that
# is the name of the main executable.
#
foreach(line ${info_plist})
if(line_is_main_executable)
string(REGEX REPLACE "^.*<string>(.*)</string>.*$" "\\1" bundle_executable "${line}")
break()
endif(line_is_main_executable)
if(line MATCHES "^.*<key>CFBundleExecutable</key>.*$")
set(line_is_main_executable 1)
endif(line MATCHES "^.*<key>CFBundleExecutable</key>.*$")
endforeach(line)
if(NOT "${bundle_executable}" STREQUAL "")
if(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
set(result "${bundle}/Contents/MacOS/${bundle_executable}")
else(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
# Ultimate goal:
# If not in "Contents/MacOS" then scan the bundle for matching files. If
# there is only one executable file that matches, then use it, otherwise
# it's an error...
#
#file(GLOB_RECURSE file_list "${bundle}/${bundle_executable}")
# But for now, pragmatically, it's an error. Expect the main executable
# for the bundle to be in Contents/MacOS, it's an error if it's not:
#
set(result "error: '${bundle}/Contents/MacOS/${bundle_executable}' does not exist")
endif(EXISTS "${bundle}/Contents/MacOS/${bundle_executable}")
endif(NOT "${bundle_executable}" STREQUAL "")
else(EXISTS "${bundle}/Contents/Info.plist")
#
# More inclusive technique... (This one would work on Windows and Linux
# too, if a developer followed the typical Mac bundle naming convention...)
#
# If there is no Info.plist file, try to find an executable with the same
# base name as the .app directory:
#
endif(EXISTS "${bundle}/Contents/Info.plist")
set(${result_var} "${result}" PARENT_SCOPE)
endfunction(get_bundle_main_executable)
# get_dotapp_dir
#
# Returns the nearest parent dir whose name ends with ".app" given the full path
# to an executable. If there is no such parent dir, then return a dir at the same
# level as the executable, named with the executable's base name and ending with
# ".app"
#
# The returned directory may or may not exist.
#
function(get_dotapp_dir exe dotapp_dir_var)
set(s "${exe}")
set(has_dotapp_parent 0)
if(s MATCHES "^.*/.*\\.app/.*$")
set(has_dotapp_parent 1)
endif(s MATCHES "^.*/.*\\.app/.*$")
set(done 0)
while(NOT ${done})
get_filename_component(snamewe "${s}" NAME_WE)
get_filename_component(sname "${s}" NAME)
get_filename_component(sdir "${s}" PATH)
if(has_dotapp_parent)
# If there is a ".app" parent directory,
# ascend until we hit it:
# (typical of a Mac bundle executable)
#
set(s "${sdir}")
if(sname MATCHES "\\.app$")
set(done 1)
set(dotapp_dir "${sdir}/${sname}")
endif(sname MATCHES "\\.app$")
else(has_dotapp_parent)
# Otherwise use a directory named the same
# as the exe, but with a ".app" extension:
# (typical of a non-bundle executable on Mac, Windows or Linux)
#
set(done 1)
set(dotapp_dir "${sdir}/${snamewe}.app")
endif(has_dotapp_parent)
endwhile(NOT ${done})
set(${dotapp_dir_var} "${dotapp_dir}" PARENT_SCOPE)
endfunction(get_dotapp_dir)
# get_bundle_and_executable
#
# Takes either a ".app" directory name or the name of an executable
# nested inside a ".app" directory and returns the path to the ".app"
# directory in ${bundle_var} and the path to its main executable in
# ${executable_var}
#
function(get_bundle_and_executable app bundle_var executable_var valid_var)
set(valid 0)
if(EXISTS "${app}")
# Is it a directory ending in .app?
if(IS_DIRECTORY "${app}")
if(app MATCHES "\\.app$")
get_bundle_main_executable("${app}" executable)
if(EXISTS "${app}" AND EXISTS "${executable}")
set(${bundle_var} "${app}" PARENT_SCOPE)
set(${executable_var} "${executable}" PARENT_SCOPE)
set(valid 1)
#message(STATUS "info: handled .app directory case...")
else(EXISTS "${app}" AND EXISTS "${executable}")
message(STATUS "warning: *NOT* handled - .app directory case...")
endif(EXISTS "${app}" AND EXISTS "${executable}")
else(app MATCHES "\\.app$")
message(STATUS "warning: *NOT* handled - directory but not .app case...")
endif(app MATCHES "\\.app$")
else(IS_DIRECTORY "${app}")
# Is it an executable file?
is_file_executable("${app}" is_executable)
if(is_executable)
get_dotapp_dir("${app}" dotapp_dir)
if(EXISTS "${dotapp_dir}")
set(${bundle_var} "${dotapp_dir}" PARENT_SCOPE)
set(${executable_var} "${app}" PARENT_SCOPE)
set(valid 1)
#message(STATUS "info: handled executable file in .app dir case...")
else()
get_filename_component(app_dir "${app}" PATH)
set(${bundle_var} "${app_dir}" PARENT_SCOPE)
set(${executable_var} "${app}" PARENT_SCOPE)
set(valid 1)
#message(STATUS "info: handled executable file in any dir case...")
endif()
else(is_executable)
message(STATUS "warning: *NOT* handled - not .app dir, not executable file...")
endif(is_executable)
endif(IS_DIRECTORY "${app}")
else(EXISTS "${app}")
message(STATUS "warning: *NOT* handled - directory/file does not exist...")
endif(EXISTS "${app}")
if(NOT valid)
set(${bundle_var} "error: not a bundle" PARENT_SCOPE)
set(${executable_var} "error: not a bundle" PARENT_SCOPE)
endif(NOT valid)
set(${valid_var} ${valid} PARENT_SCOPE)
endfunction(get_bundle_and_executable)
# get_bundle_all_executables
#
# Scans the given bundle recursively for all executable files and accumulates
# them into a variable.
#
function(get_bundle_all_executables bundle exes_var)
set(exes "")
file(GLOB_RECURSE file_list "${bundle}/*")
foreach(f ${file_list})
is_file_executable("${f}" is_executable)
if(is_executable)
set(exes ${exes} "${f}")
endif(is_executable)
endforeach(f)
set(${exes_var} "${exes}" PARENT_SCOPE)
endfunction(get_bundle_all_executables)
# get_item_key
#
# Given a file (item) name, generate a key that should be unique considering the set of
# libraries that need copying or fixing up to make a bundle standalone. This is
# essentially the file name including extension with "." replaced by "_"
#
# This key is used as a prefix for CMake variables so that we can associate a set
# of variables with a given item based on its key.
#
function(get_item_key item key_var)
get_filename_component(item_name "${item}" NAME)
if(WIN32)
string(TOLOWER "${item_name}" item_name)
endif()
string(REGEX REPLACE "\\." "_" ${key_var} "${item_name}")
set(${key_var} ${${key_var}} PARENT_SCOPE)
endfunction(get_item_key)
# clear_bundle_keys
#
# Loop over the list of keys, clearing all the variables associated with each
# key. After the loop, clear the list of keys itself.
#
# Caller of get_bundle_keys should call clear_bundle_keys when done with list
# of keys.
#
function(clear_bundle_keys keys_var)
foreach(key ${${keys_var}})
set(${key}_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_ITEM PARENT_SCOPE)
set(${key}_DEFAULT_EMBEDDED_PATH PARENT_SCOPE)
set(${key}_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_COPYFLAG PARENT_SCOPE)
endforeach(key)
set(${keys_var} PARENT_SCOPE)
endfunction(clear_bundle_keys)
# set_bundle_key_values
#
# Add a key to the list (if necessary) for the given item. If added,
# also set all the variables associated with that key.
#
function(set_bundle_key_values keys_var context item exepath dirs copyflag)
get_filename_component(item_name "${item}" NAME)
get_item_key("${item}" key)
list(LENGTH ${keys_var} length_before)
gp_append_unique(${keys_var} "${key}")
list(LENGTH ${keys_var} length_after)
if(NOT length_before EQUAL length_after)
gp_resolve_item("${context}" "${item}" "${exepath}" "${dirs}" resolved_item)
gp_item_default_embedded_path("${item}" default_embedded_path)
if(item MATCHES "[^/]+\\.framework/")
# For frameworks, construct the name under the embedded path from the
# opening "${item_name}.framework/" to the closing "/${item_name}":
#
string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
else(item MATCHES "[^/]+\\.framework/")
# For other items, just use the same name as the original, but in the
# embedded path:
#
set(embedded_item "${default_embedded_path}/${item_name}")
endif(item MATCHES "[^/]+\\.framework/")
# Replace @executable_path and resolve ".." references:
#
string(REPLACE "@executable_path" "${exepath}" resolved_embedded_item "${embedded_item}")
get_filename_component(resolved_embedded_item "${resolved_embedded_item}" ABSOLUTE)
# *But* -- if we are not copying, then force resolved_embedded_item to be
# the same as resolved_item. In the case of multiple executables in the
# original bundle, using the default_embedded_path results in looking for
# the resolved executable next to the main bundle executable. This is here
# so that exes in the other sibling directories (like "bin") get fixed up
# properly...
#
if(NOT copyflag)
set(resolved_embedded_item "${resolved_item}")
endif(NOT copyflag)
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
set(${key}_ITEM "${item}" PARENT_SCOPE)
set(${key}_RESOLVED_ITEM "${resolved_item}" PARENT_SCOPE)
set(${key}_DEFAULT_EMBEDDED_PATH "${default_embedded_path}" PARENT_SCOPE)
set(${key}_EMBEDDED_ITEM "${embedded_item}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${resolved_embedded_item}" PARENT_SCOPE)
set(${key}_COPYFLAG "${copyflag}" PARENT_SCOPE)
else(NOT length_before EQUAL length_after)
#message("warning: item key '${key}' already in the list, subsequent references assumed identical to first")
endif(NOT length_before EQUAL length_after)
endfunction(set_bundle_key_values)
# get_bundle_keys
#
# Loop over all the executable and library files within the bundle (and given as
# extra "${libs}") and accumulate a list of keys representing them. Set values
# associated with each key such that we can loop over all of them and copy
# prerequisite libs into the bundle and then do appropriate install_name_tool
# fixups.
#
function(get_bundle_keys app libs dirs keys_var)
set(${keys_var} PARENT_SCOPE)
get_bundle_and_executable("${app}" bundle executable valid)
if(valid)
# Always use the exepath of the main bundle executable for @executable_path
# replacements:
#
get_filename_component(exepath "${executable}" PATH)
# But do fixups on all executables in the bundle:
#
get_bundle_all_executables("${bundle}" exes)
# For each extra lib, accumulate a key as well and then also accumulate
# any of its prerequisites. (Extra libs are typically dynamically loaded
# plugins: libraries that are prerequisites for full runtime functionality
# but that do not show up in otool -L output...)
#
foreach(lib ${libs})
set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 1)
set(prereqs "")
get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${exepath}" "${dirs}" 1)
endforeach(pr)
endforeach(lib)
# For each executable found in the bundle, accumulate keys as we go.
# The list of keys should be complete when all prerequisites of all
# binaries in the bundle have been analyzed.
#
foreach(exe ${exes})
# Add the exe itself to the keys:
#
set_bundle_key_values(${keys_var} "${exe}" "${exe}" "${exepath}" "${dirs}" 0)
# Add each prerequisite to the keys:
#
set(prereqs "")
get_prerequisites("${exe}" prereqs 1 1 "${exepath}" "${dirs}")
foreach(pr ${prereqs})
set_bundle_key_values(${keys_var} "${exe}" "${pr}" "${exepath}" "${dirs}" 1)
endforeach(pr)
endforeach(exe)
# Propagate values to caller's scope:
#
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
foreach(key ${${keys_var}})
set(${key}_ITEM "${${key}_ITEM}" PARENT_SCOPE)
set(${key}_RESOLVED_ITEM "${${key}_RESOLVED_ITEM}" PARENT_SCOPE)
set(${key}_DEFAULT_EMBEDDED_PATH "${${key}_DEFAULT_EMBEDDED_PATH}" PARENT_SCOPE)
set(${key}_EMBEDDED_ITEM "${${key}_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM "${${key}_RESOLVED_EMBEDDED_ITEM}" PARENT_SCOPE)
set(${key}_COPYFLAG "${${key}_COPYFLAG}" PARENT_SCOPE)
endforeach(key)
endif(valid)
endfunction(get_bundle_keys)
# copy_resolved_item_into_bundle
#
# Copy a resolved item into the bundle if necessary. Copy is not necessary if
# the resolved_item is "the same as" the resolved_embedded_item.
#
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
if(WIN32)
# ignore case on Windows
string(TOLOWER "${resolved_item}" resolved_item_compare)
string(TOLOWER "${resolved_embedded_item}" resolved_embedded_item_compare)
else()
set(resolved_item_compare "${resolved_item}")
set(resolved_embedded_item_compare "${resolved_embedded_item}")
endif()
if("${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}")
message(STATUS "warning: resolved_item == resolved_embedded_item - not copying...")
else()
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
endif()
if(UNIX AND NOT APPLE)
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_item_into_bundle)
# fixup_bundle_item
#
# Get the direct/non-system prerequisites of the resolved embedded item. For each
# prerequisite, change the way it is referenced to the value of the _EMBEDDED_ITEM
# keyed variable for that prerequisite. (Most likely changing to an "@executable_path"
# style reference.)
#
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM value.
#
# Accumulate changes in a local variable and make *one* call to install_name_tool
# at the end of the function with all the changes at once.
#
function(fixup_bundle_item resolved_embedded_item exepath dirs)
# This item's key is "ikey":
#
get_item_key("${resolved_embedded_item}" ikey)
set(prereqs "")
get_prerequisites("${resolved_embedded_item}" prereqs 1 0 "${exepath}" "${dirs}")
set(changes "")
foreach(pr ${prereqs})
# Each referenced item's key is "rkey" in the loop:
#
get_item_key("${pr}" rkey)
if(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
set(changes ${changes} "-change" "${pr}" "${${rkey}_EMBEDDED_ITEM}")
else(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
message("warning: unexpected reference to '${pr}'")
endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
endforeach(pr)
# Change this item's id and all of its references in one call
# to install_name_tool:
#
execute_process(COMMAND install_name_tool
${changes} -id "${${ikey}_EMBEDDED_ITEM}" "${resolved_embedded_item}"
)
endfunction(fixup_bundle_item)
# fixup_bundle
#
# Fix up a bundle in-place and make it standalone, such that it can be drag-n-drop
# copied to another machine and run on that machine as long as all of the system
# libraries are compatible.
#
# Gather all the keys for all the executables and libraries in a bundle, and then,
# for each key, copy each prerequisite into the bundle. Then fix each one up according
# to its own list of prerequisites.
#
# Then clear all the keys and call verify_app on the final bundle to ensure that
# it is truly standalone.
#
function(fixup_bundle app libs dirs)
message(STATUS "fixup_bundle")
message(STATUS " app='${app}'")
message(STATUS " libs='${libs}'")
message(STATUS " dirs='${dirs}'")
get_bundle_and_executable("${app}" bundle executable valid)
if(valid)
get_filename_component(exepath "${executable}" PATH)
message(STATUS "fixup_bundle: preparing...")
get_bundle_keys("${app}" "${libs}" "${dirs}" keys)
message(STATUS "fixup_bundle: copying...")
list(LENGTH keys n)
math(EXPR n ${n}*2)
set(i 0)
foreach(key ${keys})
math(EXPR i ${i}+1)
if(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'")
else(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'")
endif(${${key}_COPYFLAG})
set(show_status 0)
if(show_status)
message(STATUS "key='${key}'")
message(STATUS "item='${${key}_ITEM}'")
message(STATUS "resolved_item='${${key}_RESOLVED_ITEM}'")
message(STATUS "default_embedded_path='${${key}_DEFAULT_EMBEDDED_PATH}'")
message(STATUS "embedded_item='${${key}_EMBEDDED_ITEM}'")
message(STATUS "resolved_embedded_item='${${key}_RESOLVED_EMBEDDED_ITEM}'")
message(STATUS "copyflag='${${key}_COPYFLAG}'")
message(STATUS "")
endif(show_status)
if(${${key}_COPYFLAG})
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
"${${key}_RESOLVED_EMBEDDED_ITEM}")
endif(${${key}_COPYFLAG})
endforeach(key)
message(STATUS "fixup_bundle: fixing...")
foreach(key ${keys})
math(EXPR i ${i}+1)
if(APPLE)
message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'")
fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
else(APPLE)
message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'")
endif(APPLE)
endforeach(key)
message(STATUS "fixup_bundle: cleaning up...")
clear_bundle_keys(keys)
message(STATUS "fixup_bundle: verifying...")
verify_app("${app}")
else(valid)
message(SEND_ERROR "error: fixup_bundle: not a valid bundle")
endif(valid)
message(STATUS "fixup_bundle: done")
endfunction(fixup_bundle)
# copy_and_fixup_bundle
#
# Makes a copy of the bundle "src" at location "dst" and then fixes up the
# new copied bundle in-place at "dst"...
#
function(copy_and_fixup_bundle src dst libs dirs)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${src}" "${dst}")
fixup_bundle("${dst}" "${libs}" "${dirs}")
endfunction(copy_and_fixup_bundle)
# verify_bundle_prerequisites
#
# Verifies that the sum of all prerequisites of all files inside the bundle
# are contained within the bundle or are "system" libraries, presumed to exist
# everywhere.
#
function(verify_bundle_prerequisites bundle result_var info_var)
set(result 1)
set(info "")
set(count 0)
get_bundle_main_executable("${bundle}" main_bundle_exe)
file(GLOB_RECURSE file_list "${bundle}/*")
foreach(f ${file_list})
is_file_executable("${f}" is_executable)
if(is_executable)
get_filename_component(exepath "${f}" PATH)
math(EXPR count "${count} + 1")
message(STATUS "executable file ${count}: ${f}")
set(prereqs "")
get_prerequisites("${f}" prereqs 1 1 "${exepath}" "")
# On the Mac,
# "embedded" and "system" prerequisites are fine... anything else means
# the bundle's prerequisites are not verified (i.e., the bundle is not
# really "standalone")
#
# On Windows (and others? Linux/Unix/...?)
# "local" and "system" prereqs are fine...
#
set(external_prereqs "")
foreach(p ${prereqs})
set(p_type "")
gp_file_type("${f}" "${p}" p_type)
if(APPLE)
if(NOT "${p_type}" STREQUAL "embedded" AND NOT "${p_type}" STREQUAL "system")
set(external_prereqs ${external_prereqs} "${p}")
endif()
else()
if(NOT "${p_type}" STREQUAL "local" AND NOT "${p_type}" STREQUAL "system")
set(external_prereqs ${external_prereqs} "${p}")
endif()
endif()
endforeach(p)
if(external_prereqs)
# Found non-system/somehow-unacceptable prerequisites:
set(result 0)
set(info ${info} "external prerequisites found:\nf='${f}'\nexternal_prereqs='${external_prereqs}'\n")
endif(external_prereqs)
endif(is_executable)
endforeach(f)
if(result)
set(info "Verified ${count} executable files in '${bundle}'")
endif(result)
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
endfunction(verify_bundle_prerequisites)
# verify_bundle_symlinks
#
# Verifies that any symlinks found in the bundle point to other files that are
# already also in the bundle... Anything that points to an external file causes
# this function to fail the verification.
#
function(verify_bundle_symlinks bundle result_var info_var)
set(result 1)
set(info "")
set(count 0)
# TODO: implement this function for real...
# Right now, it is just a stub that verifies unconditionally...
set(${result_var} "${result}" PARENT_SCOPE)
set(${info_var} "${info}" PARENT_SCOPE)
endfunction(verify_bundle_symlinks)
# verify_app
#
# Verifies that an application appears valid based on running analysis tools on it.
# Calls message/FATAL_ERROR if the application is not verified.
#
function(verify_app app)
set(verified 0)
set(info "")
get_bundle_and_executable("${app}" bundle executable valid)
message(STATUS "===========================================================================")
message(STATUS "Analyzing app='${app}'")
message(STATUS "bundle='${bundle}'")
message(STATUS "executable='${executable}'")
message(STATUS "valid='${valid}'")
# Verify that the bundle does not have any "external" prerequisites:
#
verify_bundle_prerequisites("${bundle}" verified info)
message(STATUS "verified='${verified}'")
message(STATUS "info='${info}'")
message(STATUS "")
if(verified)
# Verify that the bundle does not have any symlinks to external files:
#
verify_bundle_symlinks("${bundle}" verified info)
message(STATUS "verified='${verified}'")
message(STATUS "info='${info}'")
message(STATUS "")
endif(verified)
if(NOT verified)
message(FATAL_ERROR "error: verify_app failed")
endif(NOT verified)
endfunction(verify_app)

View File

@ -0,0 +1,17 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
# Do not remove this file from cvs without updating cmake.cxx to look
# for a different file.

View File

@ -0,0 +1,22 @@
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# support for AT&T syntax assemblers, e.g. GNU as
SET(ASM_DIALECT "-ATT")
# *.S files are supposed to be preprocessed, so they should not be passed to
# assembler but should be processed by gcc
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)

View File

@ -0,0 +1,11 @@
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_LINKER "@CMAKE_LINKER@")
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0)

View File

@ -0,0 +1,75 @@
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
IF(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF("${CMAKE_BASE_NAME}" STREQUAL "as")
SET(CMAKE_BASE_NAME gas)
ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
IF(CMAKE_SYSTEM_PROCESSOR)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
ENDIF(NOT _INCLUDED_FILE)
IF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
# to be done
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)

View File

@ -0,0 +1,24 @@
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# support for the MS assembler, masm and masm64
SET(ASM_DIALECT "_MASM")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)

View File

@ -0,0 +1,17 @@
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
This file is used to store compiler information and is copied down into try
compile directories so that try compiles do not need to re-determine and test the LANG
CMakeTest(LANG)Compiler.cmake -> test the compiler and set:
SET(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL "")
CMake(LANG)Information.cmake -> set up rule variables for LANG :
CMAKE_(LANG)_CREATE_SHARED_LIBRARY
CMAKE_(LANG)_CREATE_SHARED_MODULE
CMAKE_(LANG)_CREATE_STATIC_LIBRARY
CMAKE_(LANG)_COMPILE_OBJECT
CMAKE_(LANG)_LINK_EXECUTABLE

View File

@ -0,0 +1,84 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Nothing here yet
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
INCLUDE(CMakeVS7BackwardCompatibility)
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
INCLUDE(CMakeVS6BackwardCompatibility)
SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
INCLUDE (CheckTypeSize)
CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR)
CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT)
CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
INCLUDE (CheckIncludeFile)
CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
INCLUDE (TestBigEndian)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
INCLUDE (FindX11)
IF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
ELSE("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING
"X11 extra flags.")
ENDIF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
SET (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING
"Libraries and options used in X11 programs.")
SET (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.")
INCLUDE (FindThreads)
SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
"Thread library used.")
SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
"Use the pthreads library.")
SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
"Use the win32 thread library.")
SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
"Use HP pthreads.")
SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.")
ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
MARK_AS_ADVANCED(
CMAKE_HP_PTHREADS
CMAKE_THREAD_LIBS
CMAKE_USE_PTHREADS
CMAKE_USE_SPROC
CMAKE_USE_WIN32_THREADS
CMAKE_X_CFLAGS
CMAKE_X_LIBS
)

View File

@ -0,0 +1,54 @@
# - define a bunch of backwards compatibility variables
# CMAKE_ANSI_CXXFLAGS - flag for ansi c++
# CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
# INCLUDE(TestForANSIStreamHeaders)
# INCLUDE(CheckIncludeFileCXX)
# INCLUDE(TestForSTDNamespace)
# INCLUDE(TestForANSIForScope)
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# check for some ANSI flags in the CXX compiler if it is not gnu
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
INCLUDE(TestCXXAcceptsFlag)
SET(CMAKE_TRY_ANSI_CXX_FLAGS "")
IF(CMAKE_SYSTEM MATCHES "IRIX.*")
SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
IF(CMAKE_SYSTEM MATCHES "OSF.*")
SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
ENDIF(CMAKE_SYSTEM MATCHES "OSF.*")
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
# if the compiler accepts it
IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS)
# if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS
# to the flag
IF(CMAKE_CXX_ACCEPTS_FLAGS)
SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
"What flags are required by the c++ compiler to make it ansi." )
ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
INCLUDE(TestForANSIStreamHeaders)
INCLUDE(CheckIncludeFileCXX)
INCLUDE(TestForSTDNamespace)
INCLUDE(TestForANSIForScope)
INCLUDE(TestForSSTREAM)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)

View File

@ -0,0 +1,17 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -0,0 +1,13 @@
# The command CMAKE_EXPORT_BUILD_SETTINGS(...) was used by
# @PROJECT_NAME@ to generate this file. As of CMake 2.8 the
# functionality of this command has been dropped as it was deemed
# harmful (confusing users by changing their compiler).
# CMake 2.6 and below do not support loading their equivalent of this
# file if it was produced by a newer version of CMake. CMake 2.8 and
# above simply do not load this file. Therefore we simply error out.
message(FATAL_ERROR
"This @PROJECT_NAME@ was built by CMake @CMAKE_VERSION@, but this is CMake "
"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}. "
"Please upgrade CMake to a more recent version.")

View File

@ -0,0 +1,41 @@
SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
SET(CMAKE_C_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
SET(CMAKE_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@")
SET(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@")
IF(CMAKE_C_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
IF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
ENDIF(CMAKE_C_COMPILER_ABI)
SET(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")

View File

@ -0,0 +1,28 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#ifdef __CLASSIC_C__
# define const
#endif
/*--------------------------------------------------------------------------*/
#include "CMakeCompilerABI.h"
/*--------------------------------------------------------------------------*/
#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
int require = 0;
require += info_sizeof_dptr[argc];
#if defined(ABI_ID)
require += info_abi[argc];
#endif
(void)argv;
return require;
}

View File

@ -0,0 +1,99 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
#elif defined(__WATCOMC__)
# define COMPILER_ID "Watcom"
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
#elif defined(__IBMC__)
# if defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
# elif __IBMC__ >= 800
# define COMPILER_ID "XL"
# else
# define COMPILER_ID "VisualAge"
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
/* Analog Devices C++ compiler for Blackfin, TigerSHARC and
SHARC (21000) DSPs */
# define COMPILER_ID "ADSP"
/* IAR Systems compiler for embedded systems.
http://www.iar.com
Not supported yet by CMake
#elif defined(__IAR_SYSTEMS_ICC__)
# define COMPILER_ID "IAR" */
/* sdcc, the small devices C compiler for embedded systems,
http://sdcc.sourceforge.net */
#elif defined(SDCC)
# define COMPILER_ID "SDCC"
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"
/* This compiler is either not known or is too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__sgi)
# define COMPILER_ID "MIPSpro"
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
int main(int argc, char* argv[])
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
(void)argv;
return require;
}
#endif

View File

@ -0,0 +1,201 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file sets the basic flags for the C language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
IF(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
# Load compiler-specific information.
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
ENDIF(CMAKE_C_COMPILER_ID)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# load a hardware specific file, mostly useful for embedded compilers
IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
IF(CMAKE_C_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_C_FLAGS_INIT STREQUAL " ")
SET(CMAKE_C_FLAGS_INIT)
ENDIF(CMAKE_C_FLAGS_INIT STREQUAL " ")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
IF(CMAKE_C_STANDARD_LIBRARIES_INIT)
SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C applications.")
MARK_AS_ADVANCED(CMAKE_C_STANDARD_LIBRARIES)
ENDIF(CMAKE_C_STANDARD_LIBRARIES_INIT)
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rule variables
# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE
# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>
# C compiler information
# <CMAKE_C_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
# <CMAKE_C_LINK_FLAGS>
# Static library tools
# <CMAKE_AR>
# <CMAKE_RANLIB>
# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
# create a C shared module just copy the shared library rule
IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
SET(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
IF(NOT CMAKE_C_LINK_EXECUTABLE)
SET(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
MARK_AS_ADVANCED(
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
)
SET(CMAKE_C_INFORMATION_LOADED 1)

View File

@ -0,0 +1,42 @@
SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
SET(CMAKE_CXX_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@")
SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@")
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
IF(CMAKE_CXX_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
ENDIF(CMAKE_CXX_COMPILER_ABI)
SET(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")

View File

@ -0,0 +1,20 @@
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
/*--------------------------------------------------------------------------*/
#include "CMakeCompilerABI.h"
/*--------------------------------------------------------------------------*/
int main(int argc, char* argv[])
{
int require = 0;
require += info_sizeof_dptr[argc];
#if defined(ABI_ID)
require += info_abi[argc];
#endif
(void)argv;
return require;
}

View File

@ -0,0 +1,86 @@
/* This source file must have a .cpp extension so that all C++ compilers
recognize the extension without flags. Borland does not know .cxx for
example. */
#ifndef __cplusplus
# error "A C compiler has been selected for C++."
#endif
#if defined(__COMO__)
# define COMPILER_ID "Comeau"
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
#elif defined(__WATCOMC__)
# define COMPILER_ID "Watcom"
#elif defined(__SUNPRO_CC)
# define COMPILER_ID "SunPro"
#elif defined(__HP_aCC)
# define COMPILER_ID "HP"
#elif defined(__DECCXX)
# define COMPILER_ID "Compaq"
#elif defined(__IBMCPP__)
# if defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
# elif __IBMCPP__ >= 800
# define COMPILER_ID "XL"
# else
# define COMPILER_ID "VisualAge"
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
/* Analog Devices C++ compiler for Blackfin, TigerSHARC and
SHARC (21000) DSPs */
# define COMPILER_ID "ADSP"
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"
/* This compiler is either not known or is too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__sgi)
# define COMPILER_ID "MIPSpro"
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
/*--------------------------------------------------------------------------*/
int main(int argc, char* argv[])
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
(void)argv;
return require;
}

View File

@ -0,0 +1,267 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file sets the basic flags for the C++ language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
# It also loads a system - compiler - processor (or target hardware)
# specific file, which is mainly useful for crosscompiling and embedded systems.
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
IF(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
# Load compiler-specific information.
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
ENDIF(CMAKE_CXX_COMPILER_ID)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_BASE_NAME g++)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
# load a hardware specific file, mostly useful for embedded compilers
IF(CMAKE_SYSTEM_PROCESSOR)
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
ENDIF(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
IF(NOT CMAKE_MODULE_EXISTS)
SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
ENDIF(NOT CMAKE_MODULE_EXISTS)
# Create a set of shared library variable specific to C++
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
IF(NOT CMAKE_INCLUDE_FLAG_CXX)
SET(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_CXX)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP)
# Initialize CXX link type selection flags from C versions.
FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
${CMAKE_${type}_LINK_STATIC_C_FLAGS})
ENDIF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
IF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
ENDIF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
ENDFOREACH(type)
# add the flags to the cache based
# on the initial values computed in the platform/*.cmake files
# use _INIT variables so that this only happens the first time
# and you can set these flags in the cmake cache
SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
SET(CMAKE_CXX_FLAGS_INIT)
ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
IF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C++ applications.")
MARK_AS_ADVANCED(CMAKE_CXX_STANDARD_LIBRARIES)
ENDIF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rules:
# CMAKE_CXX_CREATE_SHARED_LIBRARY
# CMAKE_CXX_CREATE_SHARED_MODULE
# CMAKE_CXX_COMPILE_OBJECT
# CMAKE_CXX_LINK_EXECUTABLE
# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>
# CXX compiler information
# <CMAKE_CXX_COMPILER>
# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
# <CMAKE_CXX_LINK_FLAGS>
# Static library tools
# <CMAKE_AR>
# <CMAKE_RANLIB>
# create a shared C++ library
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
# create a c++ shared module copy the shared library rule by default
IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
# compile a C++ file into an object file
IF(NOT CMAKE_CXX_COMPILE_OBJECT)
SET(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
SET(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
MARK_AS_ADVANCED(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_DEBUG)
SET(CMAKE_CXX_INFORMATION_LOADED 1)

View File

@ -0,0 +1,107 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# this file has flags that are shared across languages and sets
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker.")
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
IF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT CMAKE_NO_BUILD_TYPE)
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker flags
SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags
SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}
CACHE STRING "Flags used by the linker during the creation of modules.")
SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
"What is the target build tool cmake is generating for.")
MARK_AS_ADVANCED(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
)

View File

@ -0,0 +1,26 @@
/*--------------------------------------------------------------------------*/
/* Size of a pointer-to-data in bytes. */
#define SIZEOF_DPTR (sizeof(void*))
const char info_sizeof_dptr[] = {
'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't', 'r', '[',
('0' + ((SIZEOF_DPTR / 10)%10)),
('0' + (SIZEOF_DPTR % 10)),
']','\0'};
/*--------------------------------------------------------------------------*/
/* Application Binary Interface. */
#if defined(__sgi) && defined(_ABIO32)
# define ABI_ID "ELF O32"
#elif defined(__sgi) && defined(_ABIN32)
# define ABI_ID "ELF N32"
#elif defined(__sgi) && defined(_ABI64)
# define ABI_ID "ELF 64"
#elif defined(__ELF__)
# define ABI_ID "ELF"
#endif
#if defined(ABI_ID)
static char const info_abi[] = "INFO:abi[" ABI_ID "]";
#endif

View File

@ -0,0 +1,2 @@
@CMAKE_CONFIGURABLE_FILE_CONTENT@

View File

@ -0,0 +1,51 @@
# - Macro to provide an option dependent on other options.
# This macro presents an option to the user only if a set of other
# conditions are true. When the option is not presented a default
# value is used, but any value set by the user is preserved for when
# the option is presented again.
# Example invocation:
# CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
# "USE_BAR;NOT USE_ZOT" OFF)
# If USE_BAR is true and USE_ZOT is false, this provides an option called
# USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
IF(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option}_AVAILABLE 1)
FOREACH(d ${depends})
STRING(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
IF(${CMAKE_DEPENDENT_OPTION_DEP})
ELSE(${CMAKE_DEPENDENT_OPTION_DEP})
SET(${option}_AVAILABLE 0)
ENDIF(${CMAKE_DEPENDENT_OPTION_DEP})
ENDFOREACH(d)
IF(${option}_AVAILABLE)
OPTION(${option} "${doc}" "${default}")
SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
ELSE(${option}_AVAILABLE)
IF(${option} MATCHES "^${option}$")
ELSE(${option} MATCHES "^${option}$")
SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
ENDIF(${option} MATCHES "^${option}$")
SET(${option} ${force})
ENDIF(${option}_AVAILABLE)
ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option} "${${option}_ISSET}")
ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")
ENDMACRO(CMAKE_DEPENDENT_OPTION)

View File

@ -0,0 +1,20 @@
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

View File

@ -0,0 +1,94 @@
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for ASM programs
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# prefer the environment variable ASM
IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
# finally list compilers to try
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}as ${_CMAKE_TOOLCHAIN_PREFIX}gas)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# If we have a gas/as cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(\\.exe)?$")
STRING(REGEX REPLACE "^(.+-)g?as(\\.exe)?$" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(\\.exe)?$")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
MESSAGE(STATUS "Didn't find assembler")
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
SET(_CMAKE_ASM_COMPILER)
SET(_CMAKE_ASM_COMPILER_ARG1)
SET(_CMAKE_ASM_COMPILER_ENV_VAR)

View File

@ -0,0 +1,27 @@
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Find the MS assembler (masm or masm64)
SET(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
IF(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
ELSE(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
ENDIF(CMAKE_CL_64)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

View File

@ -0,0 +1,181 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
# use environment variable CC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-gcc, arm-elf-ar etc.). This works
# currently with the GNU crosscompilers.
#
# Sets the following variables:
# CMAKE_C_COMPILER
# CMAKE_AR
# CMAKE_RANLIB
# CMAKE_COMPILER_IS_GNUCC
#
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
# prefer the environment variable CC
IF($ENV{CC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT)
IF(CMAKE_C_FLAGS_ENV_INIT)
SET(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
ENDIF(CMAKE_C_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
ENDIF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
ENDIF($ENV{CC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_CC)
IF(NOT CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
ENDIF(NOT CMAKE_C_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_CC)
# finally list compilers to try
IF(CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT})
ELSE(CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc)
ENDIF(CMAKE_C_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler")
IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE)
ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
ELSE(NOT CMAKE_C_COMPILER)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_C_COMPILER is a list of length 2, use the first item as
# CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1
LIST(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH)
IF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1)
LIST(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
ENDIF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
IF(NOT _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER})
MARK_AS_ADVANCED(CMAKE_C_COMPILER_WITH_PATH)
IF(CMAKE_C_COMPILER_WITH_PATH)
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
ENDIF(CMAKE_C_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_C_COMPILER_PATH)
ENDIF(NOT CMAKE_C_COMPILER)
MARK_AS_ADVANCED(CMAKE_C_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_C_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_C_COMPILER_ID_RUN)
SET(CMAKE_C_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
SET(CMAKE_C_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
# Try enabling ANSI mode on HP.
"-Aa"
)
# Try to identify the compiler.
SET(CMAKE_C_COMPILER_ID)
FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
# If we have a gcc cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc .
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
IF (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_C_COMPILER_ENV_VAR "CC")

View File

@ -0,0 +1,186 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for C++ programs
# NOTE, a generator may set CMAKE_CXX_COMPILER before
# loading this file to force a compiler.
# use environment variable CXX first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator
# as a default compiler
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-g++, arm-elf-ar etc.)
#
# Sets the following variables:
# CMAKE_CXX_COMPILER
# CMAKE_COMPILER_IS_GNUCXX
# CMAKE_AR
# CMAKE_RANLIB
#
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
IF(NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
# prefer the environment variable CXX
IF($ENV{CXX} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT)
IF(CMAKE_CXX_FLAGS_ENV_INIT)
SET(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler")
ENDIF(CMAKE_CXX_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}")
ENDIF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
ENDIF($ENV{CXX} MATCHES ".+")
# next prefer the generator specified compiler
IF(CMAKE_GENERATOR_CXX)
IF(NOT CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX})
ENDIF(NOT CMAKE_CXX_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_CXX)
# finally list compilers to try
IF(CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT})
ELSE(CMAKE_CXX_COMPILER_INIT)
SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
ENDIF(CMAKE_CXX_COMPILER_INIT)
# Find the compiler.
IF (_CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler")
IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE)
ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
ELSE(NOT CMAKE_CXX_COMPILER)
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as
# CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1
LIST(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH)
IF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1)
LIST(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
ENDIF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the CXX compiler already had a path, reuse it for searching the C compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
IF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER_WITH_PATH)
IF(CMAKE_CXX_COMPILER_WITH_PATH)
SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
ENDIF(CMAKE_CXX_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
ENDIF(NOT CMAKE_CXX_COMPILER)
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER)
IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# This block was used before the compiler was identified by building a
# source file. Unless g++ crashes when building a small C++
# executable this should no longer be needed.
#
# The g++ that comes with BeOS 5 segfaults if you run "g++ -E"
# ("gcc -E" is fine), which throws up a system dialog box that hangs cmake
# until the user clicks "OK"...so for now, we just assume it's g++.
# IF(BEOS)
# SET(CMAKE_COMPILER_IS_GNUCXX 1)
# SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
# ENDIF(BEOS)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_CXX_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
SET(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
)
# Try to identify the compiler.
SET(CMAKE_CXX_COMPILER_ID)
FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
# if we have a g++ cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++
# the other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
IF (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
# configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")

View File

@ -0,0 +1,82 @@
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Function to compile a source file to identify the compiler ABI.
# This is used internally by CMake and should not be included by user
# code.
INCLUDE(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
IF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info")
# Compile the ABI identification source.
SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}"
)
# Load the resulting information strings.
IF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info - done")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
FILE(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
FOREACH(info ${ABI_STRINGS})
IF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
STRING(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}")
ENDIF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
IF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
STRING(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}")
ENDIF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
ENDFOREACH(info)
IF(ABI_SIZEOF_DPTR)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
SET(CMAKE_SIZEOF_VOID_P "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
ENDIF(ABI_SIZEOF_DPTR)
IF(ABI_NAME)
SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${ABI_NAME}" PARENT_SCOPE)
ENDIF(ABI_NAME)
# Parse implicit linker information for this language, if available.
SET(implicit_dirs "")
SET(implicit_libs "")
IF(CMAKE_${lang}_VERBOSE_FLAG
# Implicit link information cannot be used explicitly for
# multiple OS X architectures, so we skip it.
AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
# Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
ENDIF()
SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
ELSE(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
MESSAGE(STATUS "Detecting ${lang} compiler ABI info - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n")
ENDIF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
ENDIF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ABI)

View File

@ -0,0 +1,238 @@
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Function to compile a source file to identify the compiler. This is
# used internally by CMake and should not be included by user code.
# If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Make sure the compiler arguments are clean.
STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
# Make sure user-specified compiler flags are used.
IF(CMAKE_${lang}_FLAGS)
SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
ELSE(CMAKE_${lang}_FLAGS)
SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
ENDIF(CMAKE_${lang}_FLAGS)
STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
FOREACH(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
IF(NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
ENDFOREACH(file)
ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
ENDFOREACH(flags)
# if the format is unknown after all files have been checked, put "Unknown" in the cache
IF(NOT CMAKE_EXECUTABLE_FORMAT)
SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
# Display the final identification result.
IF(CMAKE_${lang}_COMPILER_ID)
MESSAGE(STATUS "The ${lang} compiler identification is "
"${CMAKE_${lang}_COMPILER_ID}")
ELSE(CMAKE_${lang}_COMPILER_ID)
MESSAGE(STATUS "The ${lang} compiler identification is unknown")
ENDIF(CMAKE_${lang}_COMPILER_ID)
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
#-----------------------------------------------------------------------------
# Function to write the compiler id source file.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
FILE(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
STRING(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
FILE(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE)
#-----------------------------------------------------------------------------
# Function to build the compiler id source file and look for output
# files.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
# Create a clean working directory.
FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}")
# Construct a description of this test case.
SET(COMPILER_DESCRIPTION
"Compiler: ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1}
Build flags: ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
Id flags: ${testflags}
")
# Compile the compiler identification source.
IF(COMMAND EXECUTE_PROCESS)
EXECUTE_PROCESS(
COMMAND ${CMAKE_${lang}_COMPILER}
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
"${src}"
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
)
ELSE(COMMAND EXECUTE_PROCESS)
EXEC_PROGRAM(
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
\"${src}\"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
)
ENDIF(COMMAND EXECUTE_PROCESS)
# Check the result of compilation.
IF(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation failed.
SET(MSG
"Compiling the ${lang} compiler identification source file \"${src}\" failed.
${COMPILER_DESCRIPTION}
The output was:
${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
#IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# MESSAGE(FATAL_ERROR "${MSG}")
#ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# No output files should be inspected.
SET(COMPILER_${lang}_PRODUCED_FILES)
ELSE(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation succeeded.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compiling the ${lang} compiler identification source file \"${src}\" succeeded.
${COMPILER_DESCRIPTION}
The output was:
${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
# Find the executable produced by the compiler, try all files in the
# binary dir.
FILE(GLOB COMPILER_${lang}_PRODUCED_FILES
RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
${CMAKE_${lang}_COMPILER_ID_DIR}/*)
LIST(REMOVE_ITEM COMPILER_${lang}_PRODUCED_FILES "${src}")
FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" produced \"${file}\"\n\n")
ENDFOREACH(file)
IF(NOT COMPILER_${lang}_PRODUCED_FILES)
# No executable was found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
ENDIF(NOT COMPILER_${lang}_PRODUCED_FILES)
ENDIF(CMAKE_${lang}_COMPILER_ID_RESULT)
# Return the files produced by the compilation.
SET(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
#-----------------------------------------------------------------------------
# Function to extract the compiler id from an executable.
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Look for a compiler id if not yet known.
IF(NOT CMAKE_${lang}_COMPILER_ID)
# Read the compiler identification string from the executable file.
SET(COMPILER_ID)
SET(PLATFORM_ID)
FILE(STRINGS ${file}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
SET(HAVE_COMPILER_TWICE 0)
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF(COMPILER_ID)
SET(COMPILER_ID_TWICE 1)
ENDIF(COMPILER_ID)
STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
COMPILER_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
ENDFOREACH(info)
# Check if a valid compiler and platform were found.
IF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
# Check the compiler identification string.
IF(CMAKE_${lang}_COMPILER_ID)
# The compiler identification was found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \""
"${file}\"\n\n")
ELSE(CMAKE_${lang}_COMPILER_ID)
# The compiler identification could not be found.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"The ${lang} compiler identification could not be found in \""
"${file}\"\n\n")
ENDIF(CMAKE_${lang}_COMPILER_ID)
ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
# try to figure out the executable format: ELF, COFF, Mach-O
IF(NOT CMAKE_EXECUTABLE_FORMAT)
FILE(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
# ELF files start with 0x7f"ELF"
IF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format")
ENDIF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
# # COFF (.exe) files start with "MZ"
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
# SET(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
#
# # Mach-O files start with CAFEBABE or FEEDFACE, according to http://radio.weblogs.com/0100490/2003/01/28.html
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
# Return the information extracted.
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)

View File

@ -0,0 +1,218 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for Fortran programs
# NOTE, a generator may set CMAKE_Fortran_COMPILER before
# loading this file to force a compiler.
# use environment variable FC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator
# as a default compiler
IF(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC
IF($ENV{FC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
IF(CMAKE_Fortran_FLAGS_ENV_INIT)
SET(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler")
ENDIF(CMAKE_Fortran_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
ENDIF($ENV{FC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_FC)
IF(NOT CMAKE_Fortran_COMPILER_INIT)
SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
ENDIF(NOT CMAKE_Fortran_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_FC)
# finally list compilers to try
IF(CMAKE_Fortran_COMPILER_INIT)
SET(CMAKE_Fortran_COMPILER_LIST ${CMAKE_Fortran_COMPILER_INIT})
ELSE(CMAKE_Fortran_COMPILER_INIT)
# Known compilers:
# f77/f90/f95: generic compiler names
# g77: GNU Fortran 77 compiler
# gfortran: putative GNU Fortran 95+ compiler (in progress)
# fort77: native F77 compiler under HP-UX (and some older Crays)
# frt: Fujitsu F77 compiler
# pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
# lf95: Lahey-Fujitsu F95 compiler
# fl32: Microsoft Fortran 77 "PowerStation" compiler
# af77: Apogee F77 compiler for Intergraph hardware running CLIX
# epcf90: "Edinburgh Portable Compiler" F90
# fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
# ifc: Intel Fortran 95 compiler for Linux/x86
# efc: Intel Fortran 95 compiler for IA64
#
# The order is 95 or newer compilers first, then 90,
# then 77 or older compilers, gnu is always last in the group,
# so if you paid for a compiler it is picked by default.
# NOTE for testing purposes this list is DUPLICATED in
# CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST,
# PLEASE UPDATE THAT FILE AS WELL!
SET(CMAKE_Fortran_COMPILER_LIST
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
)
# Vendor-specific compiler names.
SET(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
SET(_Fortran_COMPILER_NAMES_Intel ifort ifc efc)
SET(_Fortran_COMPILER_NAMES_PGI pgf95 pgf90 pgf77)
SET(_Fortran_COMPILER_NAMES_XL xlf)
SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
# Prefer vendors matching the C and C++ compilers.
SET(CMAKE_Fortran_COMPILER_LIST
${_Fortran_COMPILER_NAMES_${CMAKE_C_COMPILER_ID}}
${_Fortran_COMPILER_NAMES_${CMAKE_CXX_COMPILER_ID}}
${CMAKE_Fortran_COMPILER_LIST})
LIST(REMOVE_DUPLICATES CMAKE_Fortran_COMPILER_LIST)
ENDIF(CMAKE_Fortran_COMPILER_INIT)
# Look for directories containing the C and C++ compilers.
SET(_Fortran_COMPILER_HINTS)
FOREACH(lang C CXX)
IF(CMAKE_${lang}_COMPILER AND IS_ABSOLUTE "${CMAKE_${lang}_COMPILER}")
GET_FILENAME_COMPONENT(_hint "${CMAKE_${lang}_COMPILER}" PATH)
IF(IS_DIRECTORY "${_hint}")
LIST(APPEND _Fortran_COMPILER_HINTS "${_hint}")
ENDIF()
SET(_hint)
ENDIF()
ENDFOREACH()
# Find the compiler.
IF(_Fortran_COMPILER_HINTS)
# Prefer directories containing C and C++ compilers.
LIST(REMOVE_DUPLICATES _Fortran_COMPILER_HINTS)
FIND_PROGRAM(CMAKE_Fortran_COMPILER
NAMES ${CMAKE_Fortran_COMPILER_LIST}
PATHS ${_Fortran_COMPILER_HINTS}
NO_DEFAULT_PATH
DOC "Fortran compiler")
ENDIF()
FIND_PROGRAM(CMAKE_Fortran_COMPILER NAMES ${CMAKE_Fortran_COMPILER_LIST} DOC "Fortran compiler")
IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
ELSE(NOT CMAKE_Fortran_COMPILER)
# we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as
# CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1
LIST(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH)
IF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1)
LIST(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER)
ENDIF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
IF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
FIND_PROGRAM(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_WITH_PATH)
IF(CMAKE_Fortran_COMPILER_WITH_PATH)
SET(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
CACHE STRING "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
ENDIF(NOT CMAKE_Fortran_COMPILER)
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
# Build a small source file to identify the compiler.
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
SET(CMAKE_Fortran_PLATFORM_ID "Windows")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_Fortran_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification executable.
SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
# Intel on windows does not preprocess by default.
"-fpp"
)
# Try to identify the compiler.
SET(CMAKE_Fortran_COMPILER_ID)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS CMakeFortranCompilerId.F)
# Fall back to old is-GNU test.
IF(NOT CMAKE_Fortran_COMPILER_ID)
EXEC_PROGRAM(${CMAKE_Fortran_COMPILER}
ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_Fortran_COMPILER_ID "GNU")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
IF(NOT CMAKE_Fortran_PLATFORM_ID)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
SET(CMAKE_Fortran_PLATFORM_ID "MinGW")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
SET(CMAKE_Fortran_PLATFORM_ID "Cygwin")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
ENDIF(NOT CMAKE_Fortran_PLATFORM_ID)
ENDIF(NOT CMAKE_COMPILER_RETURN)
ENDIF(NOT CMAKE_Fortran_COMPILER_ID)
# Set old compiler and platform id variables.
IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUG77 1)
ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
IF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
SET(CMAKE_COMPILER_IS_MINGW 1)
ELSEIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
SET(CMAKE_COMPILER_IS_CYGWIN 1)
ENDIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")

View File

@ -0,0 +1,102 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for Java programs
# NOTE, a generator may set CMAKE_Java_COMPILER before
# loading this file to force a compiler.
IF(NOT CMAKE_Java_COMPILER)
# prefer the environment variable CC
IF($ENV{JAVA_COMPILER} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(CMAKE_Java_FLAGS_ENV_INIT)
SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
ENDIF(CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
ENDIF($ENV{JAVA_COMPILER} MATCHES ".+")
IF($ENV{JAVA_RUNTIME} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+")
IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+")
SET(Java_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
$ENV{JAVA_HOME}/bin
/usr/bin
/usr/lib/java/bin
/usr/share/java/bin
/usr/local/bin
/usr/local/java/bin
/usr/local/java/share/bin
/usr/java/j2sdk1.4.2_04
/usr/lib/j2sdk1.4-sun/bin
/usr/java/j2sdk1.4.2_09/bin
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
)
# if no compiler has been specified yet, then look for one
IF(CMAKE_Java_COMPILER_INIT)
SET(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_COMPILER_INIT)
FIND_PROGRAM(CMAKE_Java_COMPILER
NAMES javac
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_COMPILER_INIT)
# if no runtime has been specified yet, then look for one
IF(CMAKE_Java_RUNTIME_INIT)
SET(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_RUNTIME_INIT)
FIND_PROGRAM(CMAKE_Java_RUNTIME
NAMES java
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_RUNTIME_INIT)
# if no archive has been specified yet, then look for one
IF(CMAKE_Java_ARCHIVE_INIT)
SET(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
ELSE(CMAKE_Java_ARCHIVE_INIT)
FIND_PROGRAM(CMAKE_Java_ARCHIVE
NAMES jar
PATHS ${Java_BIN_PATH}
)
ENDIF(CMAKE_Java_ARCHIVE_INIT)
ENDIF(NOT CMAKE_Java_COMPILER)
MARK_AS_ADVANCED(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")

View File

@ -0,0 +1,61 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
# use environment variable CCC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
IF(NOT CMAKE_RC_COMPILER)
# prefer the environment variable CC
IF($ENV{RC} MATCHES ".+")
GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
IF(CMAKE_RC_FLAGS_ENV_INIT)
SET(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
ENDIF(CMAKE_RC_FLAGS_ENV_INIT)
IF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT})
MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT})
ENDIF($ENV{RC} MATCHES ".+")
# next try prefer the compiler specified by the generator
IF(CMAKE_GENERATOR_RC)
IF(NOT CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
ENDIF(NOT CMAKE_RC_COMPILER_INIT)
ENDIF(CMAKE_GENERATOR_RC)
# finally list compilers to try
IF(CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
ELSE(CMAKE_RC_COMPILER_INIT)
SET(CMAKE_RC_COMPILER_LIST rc)
ENDIF(CMAKE_RC_COMPILER_INIT)
# Find the compiler.
FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
SET(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
ENDIF(NOT CMAKE_RC_COMPILER)
MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")

View File

@ -0,0 +1,173 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This module is used by the Makefile generator to determin the following variables:
# CMAKE_SYSTEM_NAME - on unix this is uname -s, for windows it is Windows
# CMAKE_SYSTEM_VERSION - on unix this is uname -r, for windows it is empty
# CMAKE_SYSTEM - ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION}, for windows: ${CMAKE_SYSTEM}
#
# Expected uname -s output:
#
# AIX AIX
# BSD/OS BSD/OS
# FreeBSD FreeBSD
# HP-UX HP-UX
# IRIX IRIX
# Linux Linux
# GNU/kFreeBSD GNU/kFreeBSD
# NetBSD NetBSD
# OpenBSD OpenBSD
# OFS/1 (Digital Unix) OSF1
# SCO OpenServer 5 SCO_SV
# SCO UnixWare 7 UnixWare
# SCO UnixWare (pre release 7) UNIX_SV
# SCO XENIX Xenix
# Solaris SunOS
# SunOS SunOS
# Tru64 Tru64
# Ultrix ULTRIX
# cygwin CYGWIN_NT-5.1
# MacOSX Darwin
# find out on which system cmake runs
IF(CMAKE_HOST_UNIX)
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
IF(CMAKE_UNAME)
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
IF("${val}" GREATER 0)
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
ENDIF("${val}" GREATER 0)
ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
# check the return of the last uname -m or -p
IF("${val}" GREATER 0)
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
ENDIF("${val}" GREATER 0)
SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
# processor may have double quote in the name, and that needs to be removed
STRING(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
STRING(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
ENDIF(CMAKE_UNAME)
ELSE(CMAKE_HOST_UNIX)
IF(CMAKE_HOST_WIN32)
SET (CMAKE_HOST_SYSTEM_NAME "Windows")
SET (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
ENDIF(CMAKE_HOST_WIN32)
ENDIF(CMAKE_HOST_UNIX)
# if a toolchain file is used, the user wants to cross compile.
# in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
# variables around so they can be used in CMakeLists.txt.
# In all other cases, the host and target platform are the same.
IF(CMAKE_TOOLCHAIN_FILE)
# at first try to load it as path relative to the directory from which cmake has been run
INCLUDE("${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
IF(NOT _INCLUDED_TOOLCHAIN_FILE)
# if the file isn't found there, check the default locations
INCLUDE("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
ENDIF(NOT _INCLUDED_TOOLCHAIN_FILE)
IF(_INCLUDED_TOOLCHAIN_FILE)
SET(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
ELSE(_INCLUDED_TOOLCHAIN_FILE)
MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
SET(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
ENDIF(_INCLUDED_TOOLCHAIN_FILE)
ENDIF(CMAKE_TOOLCHAIN_FILE)
# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file
# or it was set via -DCMAKE_SYSTEM_NAME=...
# if that's the case, assume we are crosscompiling
IF(CMAKE_SYSTEM_NAME)
IF(NOT DEFINED CMAKE_CROSSCOMPILING)
SET(CMAKE_CROSSCOMPILING TRUE)
ENDIF(NOT DEFINED CMAKE_CROSSCOMPILING)
SET(PRESET_CMAKE_SYSTEM_NAME TRUE)
ELSE(CMAKE_SYSTEM_NAME)
SET(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
SET(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
SET(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
SET(CMAKE_CROSSCOMPILING FALSE)
SET(PRESET_CMAKE_SYSTEM_NAME FALSE)
ENDIF(CMAKE_SYSTEM_NAME)
MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
IF(NOT ${_PREFIX}_NAME)
SET(${_PREFIX}_NAME "UnknownOS")
ENDIF(NOT ${_PREFIX}_NAME)
# fix for BSD/OS , remove the /
IF(${_PREFIX}_NAME MATCHES BSD.OS)
SET(${_PREFIX}_NAME BSDOS)
ENDIF(${_PREFIX}_NAME MATCHES BSD.OS)
# fix for GNU/kFreeBSD, remove the GNU/
IF(${_PREFIX}_NAME MATCHES kFreeBSD)
SET(${_PREFIX}_NAME kFreeBSD)
ENDIF(${_PREFIX}_NAME MATCHES kFreeBSD)
# fix for CYGWIN which has windows version in it
IF(${_PREFIX}_NAME MATCHES CYGWIN)
SET(${_PREFIX}_NAME CYGWIN)
ENDIF(${_PREFIX}_NAME MATCHES CYGWIN)
# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME
SET(${_PREFIX} ${${_PREFIX}_NAME})
# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION}
IF(${_PREFIX}_VERSION)
SET(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION})
ENDIF(${_PREFIX}_VERSION)
ENDMACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM)
# this file is also executed from cpack, then we don't need to generate these files
# in this case there is no CMAKE_BINARY_DIR
IF(CMAKE_BINARY_DIR)
# write entry to the log file
IF(PRESET_CMAKE_SYSTEM_NAME)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
ELSE(PRESET_CMAKE_SYSTEM_NAME)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
ENDIF(PRESET_CMAKE_SYSTEM_NAME)
# if a toolchain file is used, it needs to be included in the configured file,
# so settings done there are also available if they don't go in the cache and in TRY_COMPILE()
SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
IF(DEFINED CMAKE_TOOLCHAIN_FILE)
SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "INCLUDE(\"${CMAKE_TOOLCHAIN_FILE}\")")
ENDIF(DEFINED CMAKE_TOOLCHAIN_FILE)
# configure variables set in this file for fast reload, the template file is defined at the top of this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake
IMMEDIATE @ONLY)
ENDIF(CMAKE_BINARY_DIR)

View File

@ -0,0 +1,95 @@
# - Includes a public function for assisting users in trying to determine the
# Visual Studio service pack in use.
#
# Sets the passed in variable to one of the following values or an empty
# string if unknown.
# vc80
# vc80sp1
# vc90
# vc90sp1
#
# Usage:
# ===========================
#
# if(MSVC)
# include(CMakeDetermineVSServicePack)
# DetermineVSServicePack( my_service_pack )
#
# if( my_service_pack )
# message(STATUS "Detected: ${my_service_pack}")
# endif()
# endif()
#
# ===========================
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# [INTERNAL]
# Please do not call this function directly
function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
if (${_cl_version} VERSION_EQUAL "14.00.50727.42")
set(_version "vc80")
elseif(${_cl_version} VERSION_EQUAL "14.00.50727.762")
set(_version "vc80sp1")
elseif(${_cl_version} VERSION_EQUAL "15.00.21022.08")
set(_version "vc90")
elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")
set(_version "vc90sp1")
else()
set(_version "")
endif()
set(${_OUT_VAR} ${_version} PARENT_SCOPE)
endfunction()
#
# A function to call to determine the Visual Studio service pack
# in use. See documentation above.
function(DetermineVSServicePack _pack)
if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})
file(WRITE "${CMAKE_BINARY_DIR}/return0.cc"
"int main() { return 0; }\n")
try_compile(DETERMINED_VS_SERVICE_PACK
"${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}/return0.cc"
OUTPUT_VARIABLE _output
COPY_FILE "${CMAKE_BINARY_DIR}/return0.cc")
file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc")
if(DETERMINED_VS_SERVICE_PACK AND _output)
string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"
_cl_version "${_output}")
if(_cl_version)
string(REGEX MATCHALL "[0-9]+"
_cl_version_list "${_cl_version}")
list(GET _cl_version_list 0 _major)
list(GET _cl_version_list 1 _minor)
list(GET _cl_version_list 2 _patch)
list(GET _cl_version_list 3 _tweak)
set(_cl_version_string ${_major}.${_minor}.${_patch}.${_tweak})
# Call helper function to determine VS version
_DetermineVSServicePackFromCompiler(_sp "${_cl_version_string}")
if(_sp)
set(${_pack} ${_sp} CACHE INTERNAL
"The Visual Studio Release with Service Pack")
endif()
endif()
endif()
endif()
endfunction()

View File

@ -0,0 +1,36 @@
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This module is purposely no longer documented. It does nothing useful.
IF(NOT "${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS 2.7)
MESSAGE(FATAL_ERROR
"The functionality of this module has been dropped as of CMake 2.8. "
"It was deemed harmful (confusing users by changing their compiler). "
"Please remove calls to the CMAKE_EXPORT_BUILD_SETTINGS macro and "
"stop including this module. "
"If this project generates any files for use by external projects, "
"remove any use of the CMakeImportBuildSettings module from them.")
ENDIF()
# This macro used to store build settings of a project in a file to be
# loaded by another project using CMAKE_IMPORT_BUILD_SETTINGS. Now it
# creates a file that refuses to load (with comment explaining why).
MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
IF(${SETTINGS_FILE} MATCHES ".+")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
${SETTINGS_FILE} @ONLY IMMEDIATE)
ELSE(${SETTINGS_FILE} MATCHES ".+")
MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
ENDIF(${SETTINGS_FILE} MATCHES ".+")
ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS)

View File

@ -0,0 +1,75 @@
# search for additional tools required for C/C++ (and other languages ?)
#
# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-gcc etc.)
# If the cmake variable _CMAKE_TOOLCHAIN_LOCATION is set, the compiler is
# searched only there. The other tools are at first searched there, then
# also in the default locations.
#
# Sets the following variables:
# CMAKE_AR
# CMAKE_RANLIB
# CMAKE_LINKER
# CMAKE_STRIP
# CMAKE_INSTALL_NAME_TOOL
# on UNIX, cygwin and mingw
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# if it's the MS C/CXX compiler, search for link
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
MARK_AS_ADVANCED(CMAKE_LINKER)
# in all other cases search for ar, ranlib, etc.
ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
IF(NOT CMAKE_RANLIB)
SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
ENDIF(NOT CMAKE_RANLIB)
FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
# on Apple there really should be install_name_tool
IF(APPLE)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
IF(NOT CMAKE_INSTALL_NAME_TOOL)
MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
ENDIF(NOT CMAKE_INSTALL_NAME_TOOL)
MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
ENDIF(APPLE)

View File

@ -0,0 +1,23 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is included in CMakeSystemSpecificInformation.cmake if
# the CodeBlocks extra generator has been selected.
FIND_PROGRAM(CMAKE_CODEBLOCKS_EXECUTABLE NAMES codeblocks DOC "The CodeBlocks executable")
IF(CMAKE_CODEBLOCKS_EXECUTABLE)
SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" )
ENDIF(CMAKE_CODEBLOCKS_EXECUTABLE)

View File

@ -0,0 +1,97 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is included in CMakeSystemSpecificInformation.cmake if
# the Eclipse CDT4 extra generator has been selected.
FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
# The Eclipse generator needs to know the standard include path
# so that Eclipse ca find the headers at runtime and parsing etc. works better
# This is done here by actually running gcc with the options so it prints its
# system include directories, which are parsed then and stored in the cache.
MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result _resultDefines)
SET(${_result})
SET(_gccOutput)
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
SET(${_result} ${CMAKE_MATCH_1})
STRING(REPLACE "\n" " " ${_result} "${${_result}}")
SEPARATE_ARGUMENTS(${_result})
ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
IF( "${_gccStdout}" MATCHES "built-in>\"\n(.+)# 1 +\"dummy\"" )
SET(_builtinDefines ${CMAKE_MATCH_1})
# Remove the '# 1 "<command-line>"' lines
STRING(REGEX REPLACE "# 1[^\n]+\n" "" _filteredOutput "${_builtinDefines}")
# Remove the "#define " parts from the output:
STRING(REGEX REPLACE "#define " "" _defineRemoved "${_filteredOutput}")
# Replace the line breaks with spaces, so we can use separate arguments afterwards
STRING(REGEX REPLACE "\n" " " _defineRemoved "${_defineRemoved}")
# Remove space at the end, this would produce empty list items
STRING(REGEX REPLACE " +$" "" ${_resultDefines} "${_defineRemoved}")
SEPARATE_ARGUMENTS(${_resultDefines})
ENDIF( "${_gccStdout}" MATCHES "built-in>\"\n(.+)# 1 +\"dummy\"" )
ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
# to "C" that way GCC's "search starts here" text is in English and we can grok it.
SET(_orig_lc_all $ENV{LC_ALL})
SET(_orig_lc_messages $ENV{LC_MESSAGES})
SET(_orig_lang $ENV{LANG})
IF(_orig_lc_all)
SET(ENV{LC_ALL} C)
ENDIF(_orig_lc_all)
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} C)
ENDIF(_orig_lc_messages)
IF(_orig_lang)
SET(ENV{LANG} C)
ENDIF(_orig_lang)
# Now check for C, works for gcc and Intel compiler at least
IF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
SET(CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
SET(CMAKE_ECLIPSE_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
ENDIF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
ENDIF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
# And now the same for C++
IF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS)
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
SET(CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
SET(CMAKE_ECLIPSE_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
ENDIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
ENDIF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS)
# Restore original LC_ALL, LC_MESSAGES, and LANG
IF(_orig_lc_all)
SET(ENV{LC_ALL} ${_orig_lc_all})
ENDIF(_orig_lc_all)
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} ${_orig_lc_messages})
ENDIF(_orig_lc_messages)
IF(_orig_lang)
SET(ENV{LANG} ${_orig_lang})
ENDIF(_orig_lang)

View File

@ -0,0 +1,32 @@
# - helper module to find OSX frameworks
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
MACRO(CMAKE_FIND_FRAMEWORKS fwk)
SET(${fwk}_FRAMEWORKS)
IF(APPLE)
FOREACH(dir
~/Library/Frameworks/${fwk}.framework
/Library/Frameworks/${fwk}.framework
/System/Library/Frameworks/${fwk}.framework
/Network/Library/Frameworks/${fwk}.framework)
IF(EXISTS ${dir})
SET(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
ENDIF(EXISTS ${dir})
ENDFOREACH(dir)
ENDIF(APPLE)
ENDMACRO(CMAKE_FIND_FRAMEWORKS)
ENDIF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)

View File

@ -0,0 +1,23 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is included in CMakeSystemSpecificInformation.cmake if
# the KDevelop3 extra generator has been selected.
FIND_PROGRAM(CMAKE_KDEVELOP3_EXECUTABLE NAMES kdevelop DOC "The KDevelop3 executable")
IF(CMAKE_KDEVELOP3_EXECUTABLE)
SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_KDEVELOP3_EXECUTABLE} <PROJECT_FILE>" )
ENDIF(CMAKE_KDEVELOP3_EXECUTABLE)

View File

@ -0,0 +1,17 @@
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
SET (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
"Program used to build from makefiles.")
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -0,0 +1,20 @@
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES xcodebuild
PATHS
/usr/bin
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -0,0 +1,62 @@
# This module defines macros intended for use by cross-compiling
# toolchain files when CMake is not able to automatically detect the
# compiler identification.
#
# Macro CMAKE_FORCE_C_COMPILER has the following signature:
# CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
# It sets CMAKE_C_COMPILER to the given compiler and the cmake
# internal variable CMAKE_C_COMPILER_ID to the given compiler-id.
# It also bypasses the check for working compiler and basic compiler
# information tests.
#
# Macro CMAKE_FORCE_CXX_COMPILER has the following signature:
# CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)
# It sets CMAKE_CXX_COMPILER to the given compiler and the cmake
# internal variable CMAKE_CXX_COMPILER_ID to the given compiler-id.
# It also bypasses the check for working compiler and basic compiler
# information tests.
#
# So a simple toolchain file could look like this:
# INCLUDE (CMakeForceCompiler)
# SET(CMAKE_SYSTEM_NAME Generic)
# CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross)
# CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
MACRO(CMAKE_FORCE_C_COMPILER compiler id)
SET(CMAKE_C_COMPILER "${compiler}")
SET(CMAKE_C_COMPILER_ID_RUN TRUE)
SET(CMAKE_C_COMPILER_ID ${id})
SET(CMAKE_C_COMPILER_WORKS TRUE)
SET(CMAKE_C_COMPILER_FORCED TRUE)
# Set old compiler id variables.
IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
ENDMACRO(CMAKE_FORCE_C_COMPILER)
MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
SET(CMAKE_CXX_COMPILER "${compiler}")
SET(CMAKE_CXX_COMPILER_ID_RUN TRUE)
SET(CMAKE_CXX_COMPILER_ID ${id})
SET(CMAKE_CXX_COMPILER_WORKS TRUE)
SET(CMAKE_CXX_COMPILER_FORCED TRUE)
# Set old compiler id variables.
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
ENDMACRO(CMAKE_FORCE_CXX_COMPILER)

View File

@ -0,0 +1,34 @@
SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
SET(CMAKE_Fortran_COMPILER_LOADED 1)
SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
IF(CMAKE_COMPILER_IS_CYGWIN)
SET(CYGWIN 1)
SET(UNIX 1)
ENDIF(CMAKE_COMPILER_IS_CYGWIN)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@)
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95)
SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_Fortran_LINKER_PREFERENCE 20)
IF(UNIX)
SET(CMAKE_Fortran_OUTPUT_EXTENSION .o)
ELSE(UNIX)
SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
SET(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")

View File

@ -0,0 +1,3 @@
PROGRAM CMakeFortranCompilerId
PRINT *, 'ABI Detection Binary'
END

View File

@ -0,0 +1,108 @@
PROGRAM CMakeFortranCompilerId
#if 0
! Identify the compiler
#endif
#if defined(__INTEL_COMPILER) || defined(__ICC)
PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
#elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]'
#elif defined(__GNUC__)
PRINT *, 'INFO:compiler[GNU]'
#elif defined(__IBMC__)
# if defined(__COMPILER_VER__)
PRINT *, 'INFO:compiler[zOS]'
# elif __IBMC__ >= 800
PRINT *, 'INFO:compiler[XL]'
# else
PRINT *, 'INFO:compiler[VisualAge]'
# endif
#elif defined(__PGI)
PRINT *, 'INFO:compiler[PGI]'
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
PRINT *, 'INFO:compiler[MIPSpro]'
# if 0
! This compiler is either not known or is too old to define an
! identification macro. Try to identify the platform and guess that
! it is the native compiler.
# endif
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
PRINT *, 'INFO:compiler[VisualAge]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
PRINT *, 'INFO:compiler[MIPSpro]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:compiler[HP]'
#elif 1
# if 0
! The above 'elif 1' instead of 'else' is to work around a bug in the
! SGI preprocessor which produces both the __sgi and else blocks.
# endif
PRINT *, 'INFO:compiler[]'
#endif
#if 0
! Identify the platform
#endif
#if defined(__linux) || defined(__linux__) || defined(linux)
PRINT *, 'INFO:platform[Linux]'
#elif defined(__CYGWIN__)
PRINT *, 'INFO:platform[Cygwin]'
#elif defined(__MINGW32__)
PRINT *, 'INFO:platform[MinGW]'
#elif defined(__APPLE__)
PRINT *, 'INFO:platform[Darwin]'
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
PRINT *, 'INFO:platform[Windows]'
#elif defined(__FreeBSD__) || defined(__FreeBSD)
PRINT *, 'INFO:platform[FreeBSD]'
#elif defined(__NetBSD__) || defined(__NetBSD)
PRINT *, 'INFO:platform[NetBSD]'
#elif defined(__OpenBSD__) || defined(__OPENBSD)
PRINT *, 'INFO:platform[OpenBSD]'
#elif defined(__sun) || defined(sun)
PRINT *, 'INFO:platform[SunOS]'
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
PRINT *, 'INFO:platform[AIX]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]'
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
PRINT *, 'INFO:platform[Haiku]'
# if 0
! Haiku also defines __BEOS__ so we must
! put it prior to the check for __BEOS__
# endif
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
PRINT *, 'INFO:platform[QNX]'
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
PRINT *, 'INFO:platform[Tru64]'
#elif defined(__riscos) || defined(__riscos__)
PRINT *, 'INFO:platform[RISCos]'
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
PRINT *, 'INFO:platform[SINIX]'
#elif defined(__UNIX_SV__)
PRINT *, 'INFO:platform[UNIX_SV]'
#elif defined(__bsdos__)
PRINT *, 'INFO:platform[BSDOS]'
#elif defined(_MPRAS) || defined(MPRAS)
PRINT *, 'INFO:platform[MP-RAS]'
#elif defined(__osf) || defined(__osf__)
PRINT *, 'INFO:platform[OSF1]'
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
PRINT *, 'INFO:platform[SCO_SV]'
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
PRINT *, 'INFO:platform[ULTRIX]'
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
PRINT *, 'INFO:platform[Xenix]'
#elif 1
# if 0
! The above 'elif 1' instead of 'else' is to work around a bug in the
! SGI preprocessor which produces both the __sgi and else blocks.
# endif
PRINT *, 'INFO:platform[]'
#endif
END

View File

@ -0,0 +1,206 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# This file sets the basic flags for the Fortran language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.
# Load compiler-specific information.
IF(CMAKE_Fortran_COMPILER_ID)
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
ENDIF(CMAKE_Fortran_COMPILER_ID)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUG77)
SET(CMAKE_BASE_NAME g77)
ENDIF(CMAKE_COMPILER_IS_GNUG77)
IF(CMAKE_Fortran_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_Fortran_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
# have if blocks on them, users can still define them here.
# But, it should still be after the platform file so changes can
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
# Fortran needs cmake to do a requires step during its build process to
# catch any modules
SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP})
ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
IF(NOT CMAKE_INCLUDE_FLAG_Fortran)
SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran)
IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
SET(CMAKE_Fortran_FLAGS_INIT)
ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
INCLUDE(CMakeCommonLanguageInclude)
# now define the following rule variables
# CMAKE_Fortran_CREATE_SHARED_LIBRARY
# CMAKE_Fortran_CREATE_SHARED_MODULE
# CMAKE_Fortran_COMPILE_OBJECT
# CMAKE_Fortran_LINK_EXECUTABLE
# create a Fortran shared library
IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
# create a Fortran shared module just copy the shared library rule
IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
# compile a Fortran file into an object file
IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
SET(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
# link a fortran program
IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
SET(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
IF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
SET(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all Fortran applications.")
MARK_AS_ADVANCED(CMAKE_Fortran_STANDARD_LIBRARIES)
ENDIF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
MARK_AS_ADVANCED(
CMAKE_Fortran_FLAGS
CMAKE_Fortran_FLAGS_DEBUG
CMAKE_Fortran_FLAGS_MINSIZEREL
CMAKE_Fortran_FLAGS_RELEASE
CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
# set this variable so we can avoid loading this more than once.
SET(CMAKE_Fortran_INFORMATION_LOADED 1)

Some files were not shown because too many files have changed in this diff Show More