[geos-devel] [#317] Build configuration for CMake build system
mateusz at loskot.net
Mon Jan 18 16:31:26 EST 2010
I have added GEOS build configuration for CMake (http://www.cmake.org/)
build system. Here are details:
I decided to do it as I believe it will help to minimise efforts to
maintain build configurations for systems and compilers GEOS supports.
CMake is a cross-platform meta-build system. It generates a build
configuration which is native to user's environment and toolset
and does it from single source of settings, namely a bunch of
I have successfully tested using the CMake configuration to build
GEOS using makefiles and GCC on Linux as well as Visual Studio
projects on Windows. List of available generators (native build systems):
Currently, the configuration is more or less based on default settings
of native builders. It needs to be updated with compiler-specific tweaks
and some other improvements. Also, CTest and CPack features have not
been incorporated. It's matter of time.
Current status is basically equivalent to Autotools command set of:
./configure [OPTIONS] && make && make install and make clean of course.
On Windows it works with some extra addition, it can install GEOS
(select and build INSTALL.vcproj project in the VS IDE). By default, it
is installed under prefix C:\Program Files\geos in to bin, lib and
My aim is to finish CMake configuration and replace Visual Studio
hand-written makefiles and manually maintained projects for GEOS 3.3.0.
I understand that Autotools-based configuration will stay, perhaps until
the Community will CMake or forever, but this belongs to future.
I would appreciate if anybody could take a look at it, test it,
comments, critique and patches.
BTW, CMake-based build of GEOS completes in ~ 60 seconds
versus ~ 4 minutes Autotools-based build.
BTW2, for an in-depth and easy overview of the CMake, I'd this video
with lecture given at Google:
p.s. I posted CC of this message to
postgis-devel at postgis.refractions.net list as well.
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the geos-devel