summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-17 11:27:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-17 11:28:05 (GMT)
commit3143e9ffc5fcb15a9c0c1a7cfaa94587132947d1 (patch)
tree952f251d12167d5e01078949611e4345f75dde42 /Help
parent119fb8606a306e256fc6dd8c2297c9d69033384a (diff)
parent0ba5891eadbfd533f0ab30c90966bce07e5fbef8 (diff)
downloadCMake-3143e9ffc5fcb15a9c0c1a7cfaa94587132947d1.zip
CMake-3143e9ffc5fcb15a9c0c1a7cfaa94587132947d1.tar.gz
CMake-3143e9ffc5fcb15a9c0c1a7cfaa94587132947d1.tar.bz2
Merge topic 'project-version-0'
0ba5891ead project: Keep leading `0` in PROJECT_VERSION components 5f84669806 Tests: Factor out RunCMake.project helper macro into module b1f387a7ea Refactor: Use raw string literals instead of escaping 41b85968d8 Refactor: Use initializer lists instead of `push_back` series 45e85dd2b2 Refactor: Add some `const` to vars 90f91e4d21 Refactor: Replace a "magic" number w/ a named constant 638383c38f Refactor: Eliminate one-time-used variables 9b6a53292f Refactor: Eliminate `sep` from the loop Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3517
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/policy/CMP0096.rst25
-rw-r--r--Help/release/dev/project-version-0.rst5
3 files changed, 31 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index d7207e1..6bdabaf 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.16
.. toctree::
:maxdepth: 1
+ CMP0096: project() preserves leading zeros in version components. </policy/CMP0096>
CMP0095: RPATH entries are properly escaped in the intermediary CMake install script. </policy/CMP0095>
Policies Introduced by CMake 3.15
diff --git a/Help/policy/CMP0096.rst b/Help/policy/CMP0096.rst
new file mode 100644
index 0000000..8eaf0f9
--- /dev/null
+++ b/Help/policy/CMP0096.rst
@@ -0,0 +1,25 @@
+CMP0096
+-------
+
+The :command:`project` command preserves leading zeros in version components.
+
+When a ``VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]`` argument is given
+to the :command:`project` command, it stores the version string in the
+``PROJECT_VERSION`` variable and stores individual integer version components
+in ``PROJECT_VERSION_{MAJOR,MINOR,PATCH,TWEAK}`` variables (see policy
+:policy:`CMP0048`). CMake 3.15 and below dropped leading zeros from each
+component. CMake 3.16 and higher prefer to preserve leading zeros. This
+policy provides compatibility for projects that have not been updated to
+expect the new behavior.
+
+The ``OLD`` behavior of this policy drops leading zeros in all components,
+e.g. such that version ``1.07.06`` becomes ``1.7.6``. The ``NEW`` behavior
+of this policy preserves the leading zeros in all components, such that
+version ``1.07.06`` remains unchanged.
+
+This policy was introduced in CMake version 3.16. Unlike many policies, CMake
+version |release| does *not* warn when this policy is not set and simply uses
+the ``OLD`` behavior. Use the :command:`cmake_policy` command to set it to
+``OLD`` or ``NEW`` explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/release/dev/project-version-0.rst b/Help/release/dev/project-version-0.rst
new file mode 100644
index 0000000..6525522
--- /dev/null
+++ b/Help/release/dev/project-version-0.rst
@@ -0,0 +1,5 @@
+project-version-0
+-----------------
+
+* The :command:`project` no longer strips leading zeros in version components.
+ See policy :policy:`CMP0096`.