mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
project: Manage VERSION variables
Teach the project() command to set variables
{PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}
holding the project version number and its components. Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.
Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project(). Add policy CMP0048 for compatibility.
Suggested-by: Alex Neundorf <neundorf@kde.org>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<PROJECT-NAME>_VERSION
|
||||
----------------------
|
||||
|
||||
Value given to the ``VERSION`` option of the most recent call to the
|
||||
:command:`project` command with project name ``<PROJECT-NAME>``, if any.
|
||||
|
||||
See also the component-wise version variables
|
||||
:variable:`<PROJECT-NAME>_VERSION_MAJOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_MINOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_PATCH`, and
|
||||
:variable:`<PROJECT-NAME>_VERSION_TWEAK`.
|
||||
@@ -0,0 +1,5 @@
|
||||
<PROJECT-NAME>_VERSION_MAJOR
|
||||
----------------------------
|
||||
|
||||
First version number component of the :variable:`<PROJECT-NAME>_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
<PROJECT-NAME>_VERSION_MINOR
|
||||
----------------------------
|
||||
|
||||
Second version number component of the :variable:`<PROJECT-NAME>_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
<PROJECT-NAME>_VERSION_PATCH
|
||||
----------------------------
|
||||
|
||||
Third version number component of the :variable:`<PROJECT-NAME>_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
<PROJECT-NAME>_VERSION_TWEAK
|
||||
----------------------------
|
||||
|
||||
Fourth version number component of the :variable:`<PROJECT-NAME>_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,11 @@
|
||||
PROJECT_VERSION
|
||||
---------------
|
||||
|
||||
Value given to the ``VERSION`` option of the most recent call to the
|
||||
:command:`project` command, if any.
|
||||
|
||||
See also the component-wise version variables
|
||||
:variable:`PROJECT_VERSION_MAJOR`,
|
||||
:variable:`PROJECT_VERSION_MINOR`,
|
||||
:variable:`PROJECT_VERSION_PATCH`, and
|
||||
:variable:`PROJECT_VERSION_TWEAK`.
|
||||
@@ -0,0 +1,5 @@
|
||||
PROJECT_VERSION_MAJOR
|
||||
---------------------
|
||||
|
||||
First version number component of the :variable:`PROJECT_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
PROJECT_VERSION_MINOR
|
||||
---------------------
|
||||
|
||||
Second version number component of the :variable:`PROJECT_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
PROJECT_VERSION_PATCH
|
||||
---------------------
|
||||
|
||||
Third version number component of the :variable:`PROJECT_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
@@ -0,0 +1,5 @@
|
||||
PROJECT_VERSION_TWEAK
|
||||
---------------------
|
||||
|
||||
Fourth version number component of the :variable:`PROJECT_VERSION`
|
||||
variable as set by the :command:`project` command.
|
||||
Reference in New Issue
Block a user