cmake/versions.cmake: version string must have 3 parts otherwise cmake might crash (#5204)

This commit is contained in:
Daniel Marjamäki 2023-06-28 16:25:11 +02:00 committed by GitHub
parent 4f71bbe986
commit 767c0fb337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# Version for libraries CPP
# Version string must have 3 "parts". https://sourceforge.net/p/cppcheck/discussion/development/thread/e57efb2b62/
SET(VERSION "2.11.99")
STRING(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${VERSION}")
LIST(GET VERSION_PARTS 0 VERSION_MAJOR)

View File

@ -31,7 +31,7 @@
#
# Update version numbers in:
# sed -i -r "s/version 2[.][0-9]+([.]99)*/version 2.9/" cli/main.cpp
# sed -i -r "s|2[.][0-9]+([.]99)*|2.9|" cmake/versions.cmake
# sed -i -r "s|2[.][0-9]+([.]99)*|2.9.0|" cmake/versions.cmake # version must have 3 parts.
# sed -i -r "s/MINOR [0-9]+/MINOR 9/" lib/version.h
# sed -i -r "s/2[.][0-9]+([.]99)*/2.9/" win_installer/productInfo.wxi
# sed -i -r "s/subtitle: Version 2\.[0-9]+/subtitle: Version 2.9/" man/*.md