Bug report #11081
FindGEOS does not find a development version (GEOS_VERSION "x.x.xdev")
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Build/Install | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19414 |
Description
qgis master up-to-date (2014-08-20)
S.O. kubuntu linux
I use a development version of geos, GEOS_VERSION="3.5.0dev", installed in /usr/local/bin
cmake fails with error
CMake Error at cmake/FindGEOS.cmake:162 (STRING): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command
At line 162
STRING(REGEX MATCH "[0-9]+\\\\.[0-9]\\\\.[0-9]+" GEOS_VERSION ${GEOS_VERSION})
fails since $(GEOS_VERSION) is empty.
${GEOS_VERSION} is empty since at line 161
STRING(REGEX MATCH "#define GEOS_VERSION \\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\"" GEOS_VERSION ${VERSIONFILE})
does not find any match since in my geos_c.h I have
#define GEOS_VERSION "3.5.0dev"
Proposed solution is to change line 161 with
STRING(REGEX MATCH "#define GEOS_VERSION \\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+(dev)*\\"" GEOS_VERSION ${VERSIONFILE})
I've tested this against a dev and a non dev version and it seems to work.
Attached you'll find a unified git diff patch
Associated revisions
Fix GEOS dev detection (fixes #11081)
History
#1 Updated by Jürgen Fischer over 10 years ago
- Category set to Build/Install
#2 Updated by Jürgen Fischer over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 00ca017defb336e46cf773246b1ccb92aaf8540e.