[gdal-dev] RFC 84: Migrating build systems to CMake

Even Rouault even.rouault at spatialys.com
Fri Oct 15 10:42:19 PDT 2021


Hi,

Some news of the preliminary work on this.

I've initiated https://github.com/rouault/gdal/tree/import_cmake4gdal with:

- the import of the CMake configuration using the deployment script of 
https://github.com/miurahr/cmake4gdal . Again, this is really an amazing 
work from Hiroshi !

- and a reorganization of the GDAL source tree. Hiroshi's initial work 
had the top level CMakeLists at the root of the github repository, that 
set up the project and included the gdal/CMakeLists.txt and 
autotest/CMakeLists.txt. While this works fine when building from git, 
as our tarballs include just the content of gdal/, that would break. I 
presume it might have been possible to make changes to have the main 
CMakeLists.txt in gdal/, but that would be rather non-idiomatic (as it 
is already non-idiomatic for a autoconf/nmake build), so this is a good 
opportunity to use a more usual layout.

==> I've thus gone to "git mv gdal/* ." to remove the gdal/ 
subdirectory. Of course number of boring changes were needed to adapt CI 
scripts, Docker, mkgdaldist.sh, etc.  This will also impact downstream 
users building from git once that work will have landed into master. 
I'll wait for the release/3.4 branch to have been created (probably in ~ 
10 days) before merging this. A side effect is that it will slightly 
complicate the workflow for 3.5 -> 3.4 backports, but that's a temporary 
inconvenience for a longer term advantage.

Even

Le 04/10/2021 à 13:48, Even Rouault a écrit :
> Hi,
>
> Please find at https://github.com/OSGeo/gdal/pull/4590 a RFC that 
> proposes:
>
> - to develop a CMake build system, officially integrated in the source 
> tree.
>
> - and remove the current GNU makefiles and nmake build systems, when 
> the CMake build system has matured enough and reached feature parity.
>
> Best regards,
>
> Een
>
-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list