【发布时间】:2011-10-12 23:15:36
【问题描述】:
我正在开发一个在 linux 上运行 eclipse Indigo + CDT 的 C++ 项目
它由一个库项目和一个包含该库单元测试的项目组成。
显然,第二个项目依赖于第一个。
两个项目都使用外部构建器
但是当我修改第一个项目的标题时,它不会重新构建测试项目。而且我做不到......它只会重新链接第二个项目,即使标题包含在测试项目中。这很烦人,因为我在处理库时经常有工作构建,然后在某些时候我进行了完全重建,我看到了很多错误,这些错误是我 30 分钟前所做的!
CDT 全局构建控制台的示例输出:
**** Build of configuration Debug for project libxxx ****
make -j all
Building file: ../foo.cpp
Invoking: GCC C++ Compiler
ccache g++ -I"/home/foke/workspaces/cpp/libxxx/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"foo.d" -MT"foo.d" -o "foo.o" "../foo.cpp"
Finished building: ../foo.cpp
Building target: libxxx.a
Invoking: GCC Archiver
ar -r "libxxx.a" ./foo.o ./src/yyy.o ./src/detail/zzz.o
ar: creating libxxx.a
Finished building target: libxxx.a
**** Build Finished ****
**** Build of configuration Debug for project libxxx_tests ****
make -k -j all
Building target: libxxx_tests
Invoking: Cross G++ Linker
g++ -L"/home/foke/workspaces/cpp/libxxx/Debug" -o "libxxx_tests" ./main.o ./aaa.o ./tests/bbb.o ./tests/ccc.o ./tests/ddd.o -lboost_unit_test_framework -lxxx
Finished building target: libxxx_tests
**** Build Finished ****
【问题讨论】:
标签: c++ eclipse build build-process eclipse-cdt