[postgis-devel] Death to PGXS

Mateusz Loskot mateusz at loskot.net
Sun Dec 7 10:32:41 PST 2014


On 7 December 2014 at 18:07, Mark Cave-Ayland
<mark.cave-ayland at ilande.co.uk> wrote:
>
> Interestingly it seems that both the compiler (CC) and flag variables
> (CFLAGS) and (LDFLAGS) used to build PostgreSQL got added to pg_config
> at some point during the 8.x series. Given that we have dropped support
> for older PostgreSQL releases, if we can now import these variables
> directly into the CMake build rather than having CMake derive them then
> in theory the problem with incompatible builds should go away which
> makes me much happier. The only remaining problem would be the platform
> coverage for CMake, such as are CMake packages available for Solaris and
> some of the less popular systems?

Wherever PostgreSQL pg_config is available, CMake can use it.
Actually, custom FindPostgreSQL.cmake [1] module from the CMake config
we started in Paris already uses pg_config to query --version,
--includedir and  --libdir.
We can update the script to query any other variables we need too.

[1] https://github.com/mloskot/postgis/blob/cmake-build/cmake/modules/FindPostgreSQL.cmake

Best regards,
-- 
Mateusz  Loskot, http://mateusz.loskot.net



More information about the postgis-devel mailing list