[gdal-dev] Building with cmake
Bjoern Ruff
br at forstware.de
Mon May 9 01:19:09 PDT 2022
Ok, I compiled the old way (no cmake).
Thank you all for responding
Bjørn
-----Original Message-----
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of gdal-dev-bounces at lists.osgeo.org Sun May 8 14:14:13 2022
Sent: Sunday, May 8, 2022 2:14 PM
To: Even Rouault <even.rouault at spatialys.com>
Cc: gdal-dev <gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] Building with cmake
Even Rouault <even.rouault at spatialys.com> writes:
> In-tree CMake builds are only partly supported currently, because of
> the continued support of autoconf/nmake and conflicts between
> generated files of CMake with files used by autoconf/nmake. We should
> be able to fix that once support for autoconf/nmake is gone
>
> Anyway out of tree builds are always recommended.
>
> When doing "cmake ." you'll get the following warning at the end:
>
> CMake Warning at gdal.cmake:872 (message):
> In-tree builds, that is running cmake from the top of the source
> tree are
> not recommended. You are advised instead to 'mkdir build; cd build;
> cmake
> ..'. Using 'make' with the Makefile generator will not work, as it
> will
> try the GNUmakefile of autoconf builds. Use 'make -f Makefile' instead.
> Call Stack (most recent call first):
> CMakeLists.txt:218 (include)
The problem is that there are no instructions for building with cmake, and something that normally works with cmake does not. By 'there are no instructions', I mean that I looked at README.md (which is hard to read in text because of all the CI stuff), and looked for INSTALL* and BUILDING*, and grepped for cmake.
More information about the gdal-dev
mailing list