[geos-devel] RFC7: Discontinue use of autotools

Paul Ramsey pramsey at cleverelephant.ca
Mon Jan 11 15:02:42 PST 2021



> On Jan 11, 2021, at 1:09 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> 
> Cmake proponents: apart from the reservations raised by packagers, why for me does rm -rf _build not lead to
> 
> mkdir _build && cd _build && cmake .. && make
> 
> taking the same time when repeated compare to the first time through? What else do I need to delete to distclean the previous build? Is what I am seeing from searching correct, that cmake squirrels stuff away and does not offer any distclean to zero the build completely?
> 
> How can one be sure that stale stuff is not hanging around when using cmake .. in an empty _build in the local git repo

All build changes/output are confined to the build directory. You can put it in _build in the source dir. Or you can be even more isolated (this is what I do) and put it literally to the side of the source dir. I have 

$CODE/geos-git
$CODE/geos-git-build

in my working area.

You can prove it to yourself:

wget http://download.osgeo.org/geos/geos-3.9.0.tar.bz2
tar xvfj geos-3.9.0.tar.bz2
du -sk > ../before_sz.txt
# 23368
find . > ../before.txt
mkdir _build
cmake ..
time make
# 674.13s
rm -rf _build
du -sk > ../after_sz.txt
# 23368
find . > ../after.txt
diff ../before ../after
cat ../before_sz.txt ../after_sz.txt

Nothing is added to the source dir. The file list is identical before and after.
If you're building out-of-tree, the equivalent of 'make distclean' is 'rm -rf $BUILDDIR`

P.




More information about the geos-devel mailing list