On Tue, 12 Jan 2021, Paul Ramsey wrote:



On Jan 11, 2021, at 1:09 AM, Roger Bivand <roger.biv...@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

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
find . > ../before.txt
mkdir _build
cd _build
cmake ../geos-3.9.0
time make

# real  10m28.376s
# user  8m35.684s
# sys   0m51.954s

cd ..
rm -rf _build
du -sk > ../after_sz.txt
find . > ../after.txt
diff ../before.txt ../after.txt
cat ../before_sz.txt ../after_sz.txt
# 28640 .
# 28640 .

mkdir _build
cd _build
cmake ../geos-3.9.0
time make

# real  0m12.127s
# user  0m8.169s
# sys   0m3.701s

rm -rf _build

(log out and reboot system)

mkdir _build
cd _build
cmake ../geos-3.9.0
time make

# real  0m12.358s
# user  0m8.308s
# sys   0m3.393s

The ouput objects are being cached somewhere, and survive a reboot. They are not in the Gnome wastebasket either (rm doesn't put them there).

Roger


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.




--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: roger.biv...@nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to