mirror of
https://github.com/reactos/CMake.git
synced 2024-12-04 09:54:15 +00:00
ed015bde2b
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
7 lines
228 B
CMake
7 lines
228 B
CMake
include(${RunCMake_SOURCE_DIR}/check.cmake)
|
|
|
|
test_variable(CPACK_PACKAGE_VERSION "1.0")
|
|
test_variable(CPACK_PACKAGE_VERSION_MAJOR "1")
|
|
test_variable(CPACK_PACKAGE_VERSION_MINOR "0")
|
|
test_variable(CPACK_PACKAGE_VERSION_PATCH "")
|