cc-infer
Options controlling which dependencies will be inferred for CC targets.
Backend: pants.backend.experimental.cc
Config section: [cc-infer]
Basic options
include_from_source_roots
--[no-]cc-infer-include-from-source-rootsPANTS_CC_INFER_INCLUDE_FROM_SOURCE_ROOTS[cc-infer]
include_from_source_roots = <bool>
TrueInfer a target's dependencies by trying to include relative to source roots.
An example where this may be useful is if you have a a file at root/include/mylib/foo.h which may be referenced via #include "mylib/foo.h". This option will allow you to correctly infer dependencies if you have a source root at root/{include} and searching for mylib/foo.h relative to the that source root.
The inferred files take part in compilation, and the source root is added to the compilation include search path (https://clang.llvm.org/docs/ClangCommandLineReference.html#include-path-management) with command line arguments prefixed by the '-I' flag.
includes
--[no-]cc-infer-includesPANTS_CC_INFER_INCLUDES[cc-infer]
includes = <bool>
TrueInfer a target's dependencies by parsing #include statements from sources.
Advanced options
None
Deprecated options
None
Related subsystems
None