[Cmake-commits] [cmake-commits] hoffman committed CMake-2.5.X.html 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Mar 7 20:29:24 EST 2008
Update of /cvsroot/CMake/CMakeWeb/HTML
In directory public:/mounts/ram/cvs-serv1348
Modified Files:
CMake-2.5.X.html
Log Message:
ENH: update docs
Index: CMake-2.5.X.html
===================================================================
RCS file: /cvsroot/CMake/CMakeWeb/HTML/CMake-2.5.X.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMake-2.5.X.html 6 Mar 2008 16:13:22 -0000 1.1
--- CMake-2.5.X.html 8 Mar 2008 01:29:22 -0000 1.2
***************
*** 313,322 ****
<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.<br><p>The FATAL_ERROR option is accepted but ignored. It is left from CMake versions 2.4 and lower in which failure to meet the minimum version was a warning by default.
</li>
<li>
! <a name="command_cmake_policy"><b><code>cmake_policy</code></b></a>: Set how CMake should handle policies.<br>
! <pre> cmake_policy(NEW id)<br> cmake_policy(OLD id)<br> cmake_policy(VERSION version)<br> cmake_policy(PUSH)<br> cmake_policy(POP)<br></pre>
! <p>The first two forms of this command sets a specified policy to use the OLD or NEW implementation respectively. For example if a new policy is created in CMake 2.6 then you could use this command to tell the running CMake to use the OLD behavior (before the change in 2.6) or the NEW behavior.<br><p>The third form of this command indicates that the CMake List file has been written to the specified version of CMake and to the policies of that version of CMake. All policies introduced in the specified version of CMake or earlier will be set to NEW. All policies introduced after the specified version of CMake will be set to WARN (WARN is like OLD but also produces a warning) if that is possible.<br><p>The last two forms of this command push and pop the current handling of policies in CMake. This is useful when mixing multiple projects that may have been written to different versions of CMake.
</li>
<li>
--- 313,326 ----
<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.<br><p>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.<br><p>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. It is left from CMake versions 2.4 and lower in which failure to meet the minimum version was a warning by default.
</li>
<li>
! <a name="command_cmake_policy"><b><code>cmake_policy</code></b></a>: Manage CMake policy settings.<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 NEW. All policies introduced after the specified version will be set to WARN, which is like OLD but also produces a warning. This effectively requests behavior preferred as of a given CMake version and tells newer CMake versions to warn about their new policies. The policy version specified must be at least 2.4 or the command will report an error. In order to get compatibility features supporting versions earlier than 2.4 see documentation of policy CMP_0001.<br><pre> cmake_policy(SET <CMP_NNNN> NEW)<br> cmake_policy(SET <CMP_NNNN> 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(PUSH)<br> cmake_policy(POP)<br></pre>
! <p>Push and pop the current policy setting state on a stack. Each PUSH must have a matching POP. This is useful when mixing multiple projects, subprojects, and files included from external projects that may each have been written for a different version of CMake.
</li>
<li>
***************
*** 751,755 ****
<li>
<a name="command_ALLOW_DUPLICATE_CUSTOM_TARGETS"><b><code>ALLOW_DUPLICATE_CUSTOM_TARGETS</code></b></a>: Allow duplicate custom targets to be created.<br>
! <p>Normally CMake requires that all targets built in a project have globally unique names. This is necessary to generate meaningful project file names in Xcode and VS IDE generators. It also allows the target names to be referenced unambiguously.<br><p>Makefile generators are capable of supporting duplicate custom target names. For projects that care only about Makefile generators and do not wish to support Xcode or VS IDE generators, one may set this property to true to allow duplicate custom targets. The property allows multiple add_custom_target command calls in *different directories* to specify the same target name. However, setting this property will cause non-Makefile generators to produce an error and refuse to generate the project.
</li>
<li>
--- 755,759 ----
<li>
<a name="command_ALLOW_DUPLICATE_CUSTOM_TARGETS"><b><code>ALLOW_DUPLICATE_CUSTOM_TARGETS</code></b></a>: Allow duplicate custom targets to be created.<br>
! <p>Normally CMake requires that all targets built in a project have globally unique logical names (see policy CMP_0002). This is necessary to generate meaningful project file names in Xcode and VS IDE generators. It also allows the target names to be referenced unambiguously.<br><p>Makefile generators are capable of supporting duplicate custom target names. For projects that care only about Makefile generators and do not wish to support Xcode or VS IDE generators, one may set this property to true to allow duplicate custom targets. The property allows multiple add_custom_target command calls in different directories to specify the same target name. However, setting this property will cause non-Makefile generators to produce an error and refuse to generate the project.
</li>
<li>
***************
*** 1656,1662 ****
</li>
<li>
! <a name="command_FindMPI"><b><code>FindMPI</code></b></a>: Find MPI<br>
! <p>This module looks for MPI (Message Passing Interface) support it will define the following values<br><pre> MPI_INCLUDE_PATH = where mpi.h can be found<br> MPI_LIBRARY = the library to link in (mpi mpich etc)<br></pre>
!
</li>
<li>
--- 1660,1666 ----
</li>
<li>
! <a name="command_FindMPI"><b><code>FindMPI</code></b></a>: <br>
! <p>This module looks for the Message Passing Interface (MPI).<br><p>This module will set the following variables:<br><pre> MPI_FOUND TRUE if we have found MPI<br> MPI_COMPILE_FLAGS Compilation flags for MPI programs<br> MPI_INCLUDE_PATH Include path for MPI header<br> MPI_LINK_FLAGS Linking flags for MPI programs<br> MPI_LIBRARIES Libraries to link MPI programs against<br> MPI_LIBRARY Deprecated; first MPI library to link against<br> MPI_EXTRA_LIBRARY Deprecated; second MPI library to link against<br> MPIEXEC Executable for running MPI programs<br></pre>
! <p><br><p>This module will attempt to auto-detect these settings, first by looking for a C++ MPI driver (e.g., mpic++, mpiCC, or mpicxx; set by MPICXX) and later by checking common MPI paths and library names.
</li>
<li>
***************
*** 2088,2108 ****
<h2><a name="section_Policies"/>Policies</h2>
<ul>
! <li><a href="#command_CMP_0000"><b><code>CMP_0000</code></b></a></li> <li><a href="#command_CMP_0001"><b><code>CMP_0001</code></b></a></li> <li><a href="#command_CMP_0002"><b><code>CMP_0002</code></b></a></li> <li><a href="#command_CMP_0003"><b><code>CMP_0003</code></b></a></li></ul>
<ul>
<li>
! <a name="command_CMP_0000"><b><code>CMP_0000</code></b></a>: Missing a CMake version specification. You must have a cmake_policy or cmake_minimum_required call.<br>
! <p>CMake requires that projects specify what version of CMake they have been written to. The easiest way to do this is by placing a call to cmake_policy such as the following cmake_policy(VERSION 2.6) Replace 2.6 in that example with the verison of CMake you are writing to. This policy is being put in place because it aids us in detecting and maintaining backwards compatibility.
! </li>
! <li>
! <a name="command_CMP_0001"><b><code>CMP_0001</code></b></a>: CMake does not allow target names to include slash characters.<br>
! <p>CMake requires that target names not include any / or \ characters please change the name of any targets to not use such characters.
</li>
<li>
! <a name="command_CMP_0002"><b><code>CMP_0002</code></b></a>: CMake requires that target names be globaly unique.<br>
! <p>CMake requires that target names not include any / or \ characters please change the name of any targets to not use such characters.
</li>
<li>
! <a name="command_CMP_0003"><b><code>CMP_0003</code></b></a>: CMake configures file immediately after 2.0.<br>
! <p>In CMake 2.0 and earlier the configure_file command would not configure the file until after processing all CMakeLists files. In CMake 2.2 and later the default behavior is that it will configure the file right when the command is invoked.
</li>
</ul>
--- 2092,2109 ----
<h2><a name="section_Policies"/>Policies</h2>
<ul>
! <li><a href="#command_CMP_0000"><b><code>CMP_0000</code></b></a></li> <li><a href="#command_CMP_0001"><b><code>CMP_0001</code></b></a></li> <li><a href="#command_CMP_0002"><b><code>CMP_0002</code></b></a></li></ul>
<ul>
<li>
! <a name="command_CMP_0000"><b><code>CMP_0000</code></b></a>: Missing a CMake version specification. You must have a cmake_policy call.<br>
! <p>CMake requires that projects specify what version of CMake they have been written to. The easiest way to do this is by placing a call to cmake_policy at the top of your CMakeLists file. For example: cmake_policy(VERSION 2.6) Replace 2.6 in that example with the verison of CMake you are writing to. This policy is being put in place because it aids us in detecting and maintaining backwards compatibility.<br><p>This policy was introduced in CMake version 2.6.0. The version of CMake you are running defaults to warning about this policy. You can either suppress the warning without fixing the issue by adding a cmake_policy(SET CMP_0000 OLD) command to the top of your CMakeLists file or you can change your code to use the new behavior and add cmake_policy(SET CMP_0000 NEW) to your CMakeList file. If you are fixing all issues with a new version of CMake you can add cmake_policy(VERSION #.#) where #.# is the verison of CMake you are updating to. This will tell CMake that you have fixed all issues to use the new behavior.defaults to the old behavior for this policy.
</li>
<li>
! <a name="command_CMP_0001"><b><code>CMP_0001</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. The version of CMake you are running defaults to warning about this policy. You can either suppress the warning without fixing the issue by adding a cmake_policy(SET CMP_0001 OLD) command to the top of your CMakeLists file or you can change your code to use the new behavior and add cmake_policy(SET CMP_0001 NEW) to your CMakeList file. If you are fixing all issues with a new version of CMake you can add cmake_policy(VERSION #.#) where #.# is the verison of CMake you are updating to. This will tell CMake that you have fixed all issues to use the new behavior.defaults to the old behavior for this policy.
</li>
<li>
! <a name="command_CMP_0002"><b><code>CMP_0002</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. The version of CMake you are running defaults to warning about this policy. You can either suppress the warning without fixing the issue by adding a cmake_policy(SET CMP_0002 OLD) command to the top of your CMakeLists file or you can change your code to use the new behavior and add cmake_policy(SET CMP_0002 NEW) to your CMakeList file. If you are fixing all issues with a new version of CMake you can add cmake_policy(VERSION #.#) where #.# is the verison of CMake you are updating to. This will tell CMake that you have fixed all issues to use the new behavior.defaults to the old behavior for this policy.
</li>
</ul>
More information about the Cmake-commits
mailing list