Opened 3 years ago

Closed 3 years ago

#1082 closed defect (fixed)

Different version info from autotools / CMake builds

Reported by: Mike Taves Owned by: Mike Taves
Priority: minor Milestone: 3.9.0
Component: Build/Install (cmake) Version:
Severity: Unassigned Keywords:
Cc:

Description

Building GEOS with both autotools and CMake yields different version info, contained in geos_c.h. Here is the diff output comparing autotools (<) and cmake (>):

$ diff geos-3.9.0beta1-autotools/include/geos_c.h geos-3.9.0beta1-cmake/include/geos_c.h
61c61
< #define GEOS_VERSION_PATCH 0beta1
---
> #define GEOS_VERSION_PATCH 0
64c64
< #define GEOS_VERSION "3.9.0beta1"
---
> #define GEOS_VERSION "3.9.0"
71,73c71,73
< #define GEOS_CAPI_VERSION_MINOR 15
< #define GEOS_CAPI_VERSION_PATCH 1
< #define GEOS_CAPI_VERSION "3.9.0beta1-CAPI-1.15.1"
---
> #define GEOS_CAPI_VERSION_MINOR 14
> #define GEOS_CAPI_VERSION_PATCH 0
> #define GEOS_CAPI_VERSION "3.9.0-CAPI-1.14.0"

The output from geos-config --version is also different:

$ ./geos-3.9.0beta1-autotools/bin/geos-config --version
3.9.0beta1
$ ./geos-3.9.0beta1-cmake/bin/geos-config --version
3.9.0

Same with pkgconfig pkg-config geos --modversion:

$ PKG_CONFIG_PATH=./geos-3.9.0beta1-autotools/lib/pkgconfig pkg-config geos --modversion
3.9.0beta1
$ PKG_CONFIG_PATH=./geos-3.9.0beta1-cmake/lib/pkgconfig pkg-config geos --modversion
3.9.0

Change History (3)

comment:1 by Mike Taves, 3 years ago

Owner: changed from geos-devel@… to Mike Taves
Priority: majorminor

Apologies for the CAPI_VERSION differences, as this was comparing the main branch to the 3.9.0beta1 download. The correct diff for geos_c.h should now be:

$ diff geos-3.9.0beta1-autotools/include/geos_c.h geos-3.9.0beta1-cmake/include/geos_c.h
61c61
< #define GEOS_VERSION_PATCH 0beta1
---
> #define GEOS_VERSION_PATCH 0
64c64
< #define GEOS_VERSION "3.9.0beta1"
---
> #define GEOS_VERSION "3.9.0"
73c73
< #define GEOS_CAPI_VERSION "3.9.0beta1-CAPI-1.15.1"
---
> #define GEOS_CAPI_VERSION "3.9.0-CAPI-1.15.1"

I should be able to assemble a PR for the CMake build to handle the patch word similar to autotools.

comment:3 by Mike Taves <mwtoews@…>, 3 years ago

Resolution: fixed
Status: newclosed

In ab3026e/git:

CMake: re-write GEOS_VERSION and GEOS_VERSION_PATCH after project()

This is only done if GEOS_PATCH_WORD is used. Remove GEOS_VERSION_FULL.

Closes #1082

Note: See TracTickets for help on using tickets.