简体   繁体   English

提升1.59.0如何清理项目?

[英]Boost 1.59.0 how do I clean the project?

I built the project once, so it generated a bunch of .o and .a files. 我构建了一次项目,因此它生成了一堆.o和.a文件。 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. 这个页面: http//www.boost.org/build/doc/html/bbv2/overview/invocation.html告诉我b2 --clean-allb2 clean应该有效。

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: 如果将-n与--clean-all一起使用,则报告它将运行的命令,如:

b2 --clean-all -n

Then I do see things cleaned as usual. 然后我确实看到像往常一样清洁的东西。 Same with --clean. 与--clean相同。 Maybe, you're confused by the fact that configuration is printed even with --clean? 也许,你甚至用--clean打印配置这个事实让你感到困惑? That's expected, since the things to build and clean depend on configuration tests. 这是预期的,因为构建和清理的东西取决于配置测试。

I usually build with --build-dir=/tmp/build-boost . 我通常使用--build-dir=/tmp/build-boost On my system /tmp/ is mounted as tmpfs (so that when I reboot, the temporary files are gone anyways). 在我的系统/ tmp /上安装为tmpfs (因此,当我重新启动时,临时文件仍然消失)。

For this reason, I wager, you could simply look at the default value for --build-dir and remove that folder: 出于这个原因,我打赌,你可以简单地查看--build-dir的默认值并删除该文件夹:

  --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). 一个简单的试运行表明临时工具是在./bin.v2/libs/中创建的(至少在我的盒子上)。 You can see for yourself eg 你可以自己看看,例如

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 me --clean-all 确实为我删除了那些目标文件
  • using --build-dir=/somewhere/else indeed didn't create these object files in-tree (but still creates stage/lib/ obviously): 使用--build-dir=/somewhere/else确实没有在树中创建这些目标文件(但仍然创建stage/lib/ ):

     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 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM