On Mon, Jan 5, 2015 at 7:40 PM, Peter Dimov
Andrey Semashev wrote:
My opinion is that any tool that intends to parse C++ should do it right, Boost.Build included.
The tools do parse it right.
It is not possible for a dependency scanner to figure out what macros are defined to what, in general - the predefined macros differ across compilers and systems, as do the explicit -D arguments.
But even if the tool could figure it out somehow, it should not.
That's because the configuration where the dependency scanner is being run may not match the configuration in which the dependency information will be used.
That doesn't match my definition of "right". :) Because it yields incorrect result with a valid C++ code. If it can't make a valid result, better not parse C++ at all and declare a new protocol for dependency definition.