Eclipse CDT not building project on header file change

前端 未结 3 1758
时光说笑
时光说笑 2020-12-29 06:46

I have Eclipse Platform 3.7.2 and CDT 8.0.2.

When I want to do \'Build All\' headers from other workspace projects are not counted as dependencies, and nothing is re

3条回答
  •  渐次进展
    2020-12-29 07:39

    there exists a bug for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800

    And a working and neat workaround (The orignal requester knows this already). So I just crosslink to the actual answer :) https://bugs.eclipse.org/bugs/show_bug.cgi?id=375800#c11

    All credits to Krzysztof Czaińsk

    In your project c or c++ compiler settings add -MT ${OUTPUT_PREFIX}${OUTPUT} after the flags:

    ${COMMAND} ${FLAGS} -MT ${OUTPUT_PREFIX}${OUTPUT} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}
    

    This will create the correct .d-files


    Addition: The workaround has one side-effect. After a clean make all always runs twice before it says nothing to do. Still better than not compiling after a change ;-)

提交回复
热议问题