pcpp
pcpp copied to clipboard
Support for `__has_include`
I was trying to use pcpp
(1.30) on this header-only library: https://github.com/tzlaine/parser
I am using command
/home/andrzej/.local/bin/pcpp boost/parser/parser.hpp -UBOOST_PARSER_DOXYGEN -I.
I am encountering two problems.
- The tool seems not to recognize
__has_include
and ends with an error when it encounters one. - The rendered output is missing content. E.g., there is no
#define
even though one sees plenty of them when one looks through the header files of the library.
Any help would be most appreciated.
https://github.com/ned14/pcpp/issues/53 has a workaround for lack of __has_include
.
Unless you turn on a --passthru-*
option pcpp
will behave like a normal C++ preprocessor and expand all macros.
FYI https://github.com/ned14/outcome/blob/develop/CMakeLists.txt#L115 is how Outcome uses pcpp
to generate its single include edition, and may be a good source of inspiration.