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

Even Rouault even.rouault at spatialys.com
Tue Oct 5 06:55:18 PDT 2021


Le 05/10/2021 à 15:24, Javier Jimenez Shaw a écrit :
> I also accept some included by default, that can be disabled with an 
> option. But never silently depending on what is installed.

autoconf builds largely automatically uses installed things when they 
are in standard locations. That's the practice of most other projects, 
which is very convenient, and that should be kept. The only requirement 
for GDAL is PROJ, but if you don't have libcurl, libexpat, etc., you 
loose a lot of functionality, and requiring users to list all them would 
be painful.

For most packaging system, the set of dependencies available at build 
time is fully controlled by the package requirements. We can assume that 
whatever if available is wished to be used, and ideally a plain "cmake 
.." should automatically find what is available. And if the packager 
properly enumerates its build-time and run-time dependencies, that 
should work.

People can explicitly disable a dependency they don't want. We could 
perhaps have some option to disable everything by default, and require 
explicit activation in use cases where people want full control, but 
that shouldn't be the default behavior.


> .___ ._ ..._ .. . ._. .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
>
> On Tue, 5 Oct 2021 at 15:11, Greg Troxel <gdt at lexort.com 
> <mailto:gdt at lexort.com>> wrote:
>
>
>     Javier Jimenez Shaw <j1 at jimenezshaw.com
>     <mailto:j1 at jimenezshaw.com>> writes:
>
>     > How would CMake behave with all those options that are defined
>     depending on
>     > what is present on the compiler machine?
>     >
>     > IMHO, the libraries included should be independent on what is
>     already
>     > installed on the compiler machine. The last time something/somebody
>     > included "zstd" in our compiler machine, and not in the
>     executing machine,
>     > and we couldn't run anything. We did not need zstd, but it was
>     there,
>     > breaking the execution. I know that the solution there is disable it
>     > "--without-zstd". What I do not like is the lack of definition,
>     because
>     > what is present on the compiler machine may change.
>
>     I agree that is is best for a build to hard-require what is
>     required and
>     decline to use things that are not required.   I don't think this
>     issue
>     is any different autoconf vs cmake.
>
-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211005/d32b80ff/attachment.html>


More information about the gdal-dev mailing list