[postgis-devel] CMake Progress?

Mateusz Loskot mateusz at loskot.net
Wed Jul 11 15:48:16 PDT 2012


On 20 June 2012 07:03, Mateusz Loskot <mateusz at loskot.net> wrote:
> On 19 Jun 2012 22:52, "Mark Cave-Ayland" <mark.cave-ayland at ilande.co.uk>
> wrote:
>> On 15/06/12 00:17, Mateusz Loskot wrote:
>>
>>> Long story short, I'm going to work on the CMake configuration to make
>>> PostGIS
>>> build, run and test on Linux first. I'll work against my fork of
>>> PostGIS git repo
>>> at GitHub, I think.
>>>
>>> Mark, Paul, what you think? Shall we collaborate for this at GitHub?
>>> Perhaps having normal branch in SVN would be better?
>>> I have no strong preferences, but assuming as there are at least two
>>> people,
>>> Mark and myself, who aim to work on CMake, it would be good to have place
>>> to
>>> push updates
>>
>>
>> Okay cool :)  I think send an email to postgis-devel when you've got
>> something on github and then we can go take a look.
>
> Mark,
>
> Ok, I'm working against my clone of PostGIS at GitHub
> and will keep you posted, soon.

Folks,

Quick report on progress:
I have committed the config built during in Paris,
added generating (most) configure headers,
completed liblwgeom and libpgcommon configuration,
postgis module nearly finished too,
and finally I've got successful prototype of preprocessing
SQL files (currently only using cpp).

Next, I'm going to figure out how to handle the PGXS makefile -
it is not required to build PostGIS binaries, but it is useful to avoid
hassle of sync'ing and maintenance of PostgreSQL specific settings.

I also need to figure out how to avoid using Sandro's couter-portable
solution for getting SVN or Git revision generated into postgis_svn_revision.h
generated using utils/svn_repo_revision.pl

For Subversion, it's easy with Subversion_WC_INFO details using the
shipped macro:
http://cmake.org/cmake/help/v2.8.8/cmake.html#module:FindSubversion

For Git, such macro is not shipped with CMake yet, but...let's bless
open source:
https://github.com/Slicer/Slicer/blob/master/CMake/FindGit.cmake

So, I don't wanna hear aobut utils/svn_repo_revision.pl in CMake ;-)

One note on generated files, headers, SQL, etc.
In CMake, builds happen out of source tree, so the typical approach
is to generate intermediate and volatile files in out of the sources too,
in build directory. I'm following this common convention.
I don't expect any troubles due to that.


Now, here is my fork with cmake-build branch:

https://github.com/mloskot/postgis/tree/cmake-build

Here is pull request where all CMake related changes are gathered,
so it's easy to monitor what's new:

https://github.com/postgis/postgis/pull/1

My plan is this:
- Complete CMake configuration for all (public) targets (as in Makefiles)
-- I use CMake Object Libraries feature, so CMake 2.8.8 or later is required
- Make it build on Unix with GCC and make.
- Once tested and proved sound, update CMake configs for Windows
and Visual C++ (this will also require some fixes in C sources)

Input welcome, of any kind.

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



More information about the postgis-devel mailing list