[gdal-dev] Building with cmake

Greg Troxel gdt at lexort.com
Sun May 8 03:37:28 PDT 2022


Paul Harwood <runette at gmail.com> writes:

> I get that error message when I try to use the source directory as the
> build directory.
>
> With cmake, it is better to use a different folder structure for the build
> - if I remember correctly something like running cmake in a clean version
> of the repository but using ..
>
> cmake -S . -B ../build

or

  mkdir build
  cd build
  cmake ..

While I completely agree that it's better to buse a build directory, I
think it's a bug if cmake in the source dir fails, unless it is
documented not to work and it bails out early with a nice error message.

There also should be a checked-in clean script that removes all
cmake-generated files, sort of like "make maintainerclean".

 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220508/401cc358/attachment.sig>


More information about the gdal-dev mailing list