I am trying to compile a C++ module into an existing Rust codebase. My C++ code depends on a large external library, but only uses a small subset of that libraries exposed features.
When I try to compile my code using cxx I get warnings about missing headers. These come from files in the external library, but all the missing headers are conditionally included. For example:
#ifdef WITH_TBB
# include <tbb/blocked_range.h>
#endif
My library does not set these flags, and does not use the missing modules.
I appreciate that by default cxx has no way of knowing whether these flags are set, so probably can't tell whether I do or do not require these components and is conservatively assuming everything is necessary.
Is there a way to tell cxx certain conditional imports are not required? Or do I need to try and install all the missing modules?
I am trying to compile a C++ module into an existing Rust codebase. My C++ code depends on a large external library, but only uses a small subset of that libraries exposed features.
When I try to compile my code using
cxx
I get warnings about missing headers. These come from files in the external library, but all the missing headers are conditionally included. For example:My library does not set these flags, and does not use the missing modules.
I appreciate that by default
cxx
has no way of knowing whether these flags are set, so probably can't tell whether I do or do not require these components and is conservatively assuming everything is necessary.Is there a way to tell
cxx
certain conditional imports are not required? Or do I need to try and install all the missing modules?