Skip to content

Use C compiler to help scan for header dependencies #2601

Open
@bdbaddog

Description

@bdbaddog

This issue was originally created at: 2010-04-01 16:36:16.
This issue was reported by: witkamp.

witkamp said at 2010-04-01 16:36:16

The current scanner implementation uses some partial macro expansion. This is not good enough especially when using the C preproccessor for configuration.

For example:

#define HEADER "foo.h"
#include HEADER

The current scanner does not detect "foo.h" as a dependency, and you can imagine more sophisticated macros will not work as well.

This is not that big of a problem until someone tried to build variants. Because the scanner does not find the dependency, it is not copied to the variant_dir and the build fails.

Suggested Solution:

Why not run the compiler in preprocessor only mode and scan that output? This guarantees scons will generate correct dependencies.

gregnoel said at 2010-04-30 17:08:38

Bug party triage. The experimental C/C++ scanner will do this, but its use is undocumented. Steven to document how to use it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions