Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for __has_include #97

Open
akrzemi1 opened this issue Feb 5, 2024 · 2 comments
Open

Support for __has_include #97

akrzemi1 opened this issue Feb 5, 2024 · 2 comments

Comments

@akrzemi1
Copy link

akrzemi1 commented Feb 5, 2024

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.

  1. The tool seems not to recognize __has_include and ends with an error when it encounters one.
  2. 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.

@ned14
Copy link
Owner

ned14 commented Feb 5, 2024

#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.

@ned14
Copy link
Owner

ned14 commented Feb 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants