I built the project once, so it generated a bunch of .o and .a files. Now, I am trying to clean it.
This page: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html tells me that b2 --clean-all
or b2 clean
should work.
However, I tried:
b2 clean
b2 --clean
b2 --clean-all
None of them seem to do anything. How do I clean the boost workspace?
If use -n together with --clean-all, to report the commands it would run, like:
b2 --clean-all -n
Then I do see things cleaned as usual. Same with --clean. Maybe, you're confused by the fact that configuration is printed even with --clean? That's expected, since the things to build and clean depend on configuration tests.
I usually build with --build-dir=/tmp/build-boost
. On my system /tmp/ is mounted as tmpfs
(so that when I reboot, the temporary files are gone anyways).
For this reason, I wager, you could simply look at the default value for --build-dir
and remove that folder:
--build-dir=DIR Build in this location instead of building within
the distribution tree. Recommended!
Regardless of this, cleaning is not required for consistent (re)builds.
A simple trial run shows that the temporaries are created in ./bin.v2/libs/
(at least on my box). You can see for yourself e.g.
ommon.mkdir bin.v2/libs/filesystem
common.mkdir bin.v2/libs/filesystem/build
common.mkdir bin.v2/libs/filesystem/build/gcc-4.9.2
common.mkdir bin.v2/libs/filesystem/build/gcc-4.9.2/release
common.mkdir bin.v2/libs/filesystem/build/gcc-4.9.2/release/threading-multi
gcc.compile.c++ bin.v2/libs/filesystem/build/gcc-4.9.2/release/threading-multi/codecvt_error_category.o
Notes
--clean-all
did remove those object files for meusing --build-dir=/somewhere/else
indeed didn't create these object files in-tree (but still creates stage/lib/
obviously):
common.mkdir /somewhere/else/boost/bin.v2/libs/filesystem
common.mkdir /somewhere/else/boost/bin.v2/libs/filesystem/build
common.mkdir /somewhere/else/boost/bin.v2/libs/filesystem/build/gcc-4.9.2
common.mkdir /somewhere/else/boost/bin.v2/libs/filesystem/build/gcc-4.9.2/release
common.mkdir /somewhere/else/boost/bin.v2/libs/filesystem/build/gcc-4.9.2/release/threading-multi
gcc.compile.c++ /somewhere/else/boost/bin.v2/libs/filesystem/build/gcc-4.9.2/release/threading-multi/codecvt_error_category.o
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With