Files
CMake/Tests/RunCMake/project/CMP0096-common.cmake
Alex Turbov 0ba5891ead project: Keep leading 0 in PROJECT_VERSION components
Introduce CMake policy `CMP0096` to make `project()` keep leading zeros
in version components.  As a side effect, it now allows really long
version numbers.

Fixes: #19421
Co-Author: Brad King <brad.king@kitware.com>
2019-07-16 07:48:40 -04:00

10 lines
310 B
CMake

include(PrintVersions.cmake)
# Test leading zeros motivating this policy.
project(DateVersion VERSION 2019.07.06 LANGUAGES NONE)
print_versions(DateVersion)
# Overflow version component in OLD behavior.
project(LongVersion VERSION 4294967297 #[[ uint32_max + 2 ]] LANGUAGES NONE)
print_versions(LongVersion)