[Cmake-commits] CMake branch, next, updated. v3.5.0-633-g3fb51b5

Brad King brad.king at kitware.com
Wed Mar 23 14:41:53 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  3fb51b5a58099c929e090d58b8765e881a3d901d (commit)
       via  1dc8486b40d9a4885a88fa01573ba7a6e1f0690a (commit)
      from  d501d79721099385a2452450a6c16b18cd259224 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fb51b5a58099c929e090d58b8765e881a3d901d
commit 3fb51b5a58099c929e090d58b8765e881a3d901d
Merge: d501d79 1dc8486
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 23 14:41:53 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 23 14:41:53 2016 -0400

    Merge topic 'doc-cmake_minimum_required-policy-reset' into next
    
    1dc8486b Help: Organize and clarify `cmake_minimum_required` documentation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1dc8486b40d9a4885a88fa01573ba7a6e1f0690a
commit 1dc8486b40d9a4885a88fa01573ba7a6e1f0690a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 23 14:39:48 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 23 14:39:48 2016 -0400

    Help: Organize and clarify `cmake_minimum_required` documentation
    
    State more explicitly that `cmake_policy(VERSION)` is implied and
    explain the effects it has.

diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst
index dc65a9e..9535bf3 100644
--- a/Help/command/cmake_minimum_required.rst
+++ b/Help/command/cmake_minimum_required.rst
@@ -1,29 +1,14 @@
 cmake_minimum_required
 ----------------------
 
-Set the minimum required version of cmake for a project.
-
-::
+Set the minimum required version of cmake for a project and
+update `Policy Settings`_ to match the version given::
 
   cmake_minimum_required(VERSION major.minor[.patch[.tweak]]
                          [FATAL_ERROR])
 
 If the current version of CMake is lower than that required it will
-stop processing the project and report an error.  When a version
-higher than 2.4 is specified the command implicitly invokes
-
-::
-
-  cmake_policy(VERSION major[.minor[.patch[.tweak]]])
-
-which sets the cmake policy version level to the version specified.
-When version 2.4 or lower is given the command implicitly invokes
-
-::
-
-  cmake_policy(VERSION 2.4)
-
-which enables compatibility features for CMake 2.4 and lower.
+stop processing the project and report an error.
 
 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
@@ -39,3 +24,27 @@ with an error instead of just a warning.
   Calling ``cmake_minimum_required()`` inside a :command:`function`
   limits some effects to the function scope when invoked.  Such calls
   should not be made with the intention of having global effects.
+
+Policy Settings
+^^^^^^^^^^^^^^^
+
+The ``cmake_minimum_required(VERSION)`` command implicitly invokes the
+:command:`cmake_policy(VERSION)` command to specify that the current
+project code 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.
+
+When a version higher than 2.4 is specified the command implicitly
+invokes::
+
+  cmake_policy(VERSION major[.minor[.patch[.tweak]]])
+
+which sets the cmake policy version level to the version specified.
+When version 2.4 or lower is given the command implicitly invokes::
+
+  cmake_policy(VERSION 2.4)
+
+which enables compatibility features for CMake 2.4 and lower.

-----------------------------------------------------------------------

Summary of changes:
 Help/command/cmake_minimum_required.rst |   45 ++++++++++++++++++-------------
 1 file changed, 27 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list