diff options
author | Brad King <brad.king@kitware.com> | 2018-07-26 14:28:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-27 14:01:29 (GMT) |
commit | ed015bde2b6fe526f5f840f43c1c12ba45d5663f (patch) | |
tree | db16a60948497ff37a92933ec7cb27f5e4a343dc /Tests/RunCMake/CPackConfig/Version2.cmake | |
parent | f84c15ef2fa30dd074fcccafccec6b9b69266619 (diff) | |
download | CMake-ed015bde2b6fe526f5f840f43c1c12ba45d5663f.zip CMake-ed015bde2b6fe526f5f840f43c1c12ba45d5663f.tar.gz CMake-ed015bde2b6fe526f5f840f43c1c12ba45d5663f.tar.bz2 |
CPack: Restore support for 0-valued version components
In commit v3.12.0-rc1~136^2 (CPack: Use project version as default for
`CPACK_PACKAGE_VERSION`, 2018-04-29) we did not account for the value of
`CMAKE_PROJECT_VERSION_{MAJOR,MINOR,PATCH}` having `0`. Fix the logic
to distinguish between unprovided version components and `0` components.
While at it, add a test case covering the behavior described in the
documentation by the original commit. The number of version components
in the package name should match those provided to the `project()`
command `VERSION` option.
Fixes: #18199
Diffstat (limited to 'Tests/RunCMake/CPackConfig/Version2.cmake')
-rw-r--r-- | Tests/RunCMake/CPackConfig/Version2.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPackConfig/Version2.cmake b/Tests/RunCMake/CPackConfig/Version2.cmake new file mode 100644 index 0000000..c084137 --- /dev/null +++ b/Tests/RunCMake/CPackConfig/Version2.cmake @@ -0,0 +1 @@ +project(Version LANGUAGES NONE VERSION 1.0) |