mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-23 07:28:51 -06:00
WriteBasicConfigVersion supports version strings such as 21.07.04
Fixes #22207
This commit is contained in:
@@ -17,6 +17,9 @@ else()
|
||||
|
||||
if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.")
|
||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
|
||||
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
|
||||
endif()
|
||||
else()
|
||||
set(CVF_VERSION_MAJOR "@CVF_VERSION@")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user