bfgroup / b2

B2 makes it easy to build C++ projects, everywhere.
https://www.bfgroup.xyz/b2/
Boost Software License 1.0
76 stars 228 forks source link

commented modified rebuild #347

Closed fasxmut closed 9 months ago

fasxmut commented 9 months ago

I describe it as folloing step by step, I wish no misunderstanding:

1.

My project has a.hpp, b.hpp, assume a.hpp is:

#include "b.hpp"

Then I rebuild my project:

b2

default toolset is gcc.

2.

Uncomment it, let a.hpp become:

//#include "b.hpp"

Then I rebuild my project.

b2

3.

Now I make modification to b.hpp,

and execute:

b2

The whole project will be rebuilt. Should the whole project not be rebuilt ?

grafikrobot commented 9 months ago

That behavior is intended. B2 does a rather liberal header dependency scanning that does match #include in comments. It's technically a "feature" in that it allows to add dependencies that are: for preprocessor type includes (#include SOME_DEF), and for non-c++ files (#include "logo.rc").

fasxmut commented 9 months ago

That behavior is intended. B2 does a rather liberal header dependency scanning that does match #include in comments. It's technically a "feature" in that it allows to add dependencies that are: for preprocessor type includes (#include SOME_DEF), and for non-c++ files (#include "logo.rc").

OK, I see. Thank you.