Accepting request 915515 from home:rhabacker:branches:games

- Be more verbose when version in generated xxxConfigVersion.cmake
  files is empty.

OBS-URL: https://build.opensuse.org/request/show/915515
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=471
This commit is contained in:
Simon Lees 2021-09-06 09:32:21 +00:00 committed by Git OBS Bridge
parent 9c6800380e
commit 7312b9c23d
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 31 13:19:26 UTC 2021 - Ralf Habacker <ralf.habacker@freenet.de>
- Be more verbose when version in generated xxxConfigVersion.cmake
files is empty.
-------------------------------------------------------------------
Sun Aug 29 13:38:36 UTC 2021 - Andreas Stieger <andreas.stieger@gmx.de>

View File

@ -69,7 +69,11 @@ class CMakeParser:
# set(PACKAGE_VERSION <version>)
version = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line)
if version:
return version.groups(1)[0]
_version = version.groups(1)[0]
if _version == '..':
sys.stderr.write("error: Version pattern found without values - '%s' was created incorrectly\n" % versionFile)
return _version
return None