diff options
author | Brad King <brad.king@kitware.com> | 2014-01-29 14:28:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-29 14:45:18 (GMT) |
commit | 7e142c5ac2be11097f7ff905b1606179803043d7 (patch) | |
tree | d7565d46f43fa420270d0111bd30e5279c58c9dc /Tests/RunCMake/project/VersionMissingValueOkay.cmake | |
parent | 16d040c958c68c38b2c0642b4094245af28c1910 (diff) | |
download | CMake-7e142c5ac2be11097f7ff905b1606179803043d7.zip CMake-7e142c5ac2be11097f7ff905b1606179803043d7.tar.gz CMake-7e142c5ac2be11097f7ff905b1606179803043d7.tar.bz2 |
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>
Diffstat (limited to 'Tests/RunCMake/project/VersionMissingValueOkay.cmake')
-rw-r--r-- | Tests/RunCMake/project/VersionMissingValueOkay.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/project/VersionMissingValueOkay.cmake b/Tests/RunCMake/project/VersionMissingValueOkay.cmake new file mode 100644 index 0000000..1fb1437 --- /dev/null +++ b/Tests/RunCMake/project/VersionMissingValueOkay.cmake @@ -0,0 +1,6 @@ +cmake_policy(SET CMP0048 NEW) +set(PROJECT_VERSION 1) +project(ProjectA VERSION LANGUAGES NONE) +get_property(langs GLOBAL PROPERTY ENABLED_LANGUAGES) +message(STATUS "ENABLED_LANGUAGES='${langs}'") +message(STATUS "PROJECT_VERSION='${PROJECT_VERSION}'") |