Skip to content

doxygen: predefine non-standard specifiers and fix include paths #1355

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

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

eramongodb
Copy link
Contributor

Followup to #1353. After further investigation, it seems preferable to predefine the non-standard attribute syntax as macros rather than predefining/redefining the library macros which they are used with. This avoids the need for Doxygen preprocessor handling in the export headers (reverted the changes in #1353), simplifies the list of predefined macros in the Doxygen configuration file, and extends Doxygen parser confusion mitigation to all non-standard syntax (declspec and pragmas).

This revealed some Doxygen preprocessor confusion concerning how v_noabi prelude headers transitively include v1 headers, such that macros in bsoncxx/v1/config/export.hpp are not being correctly provided by bsoncxx/config/prelude.hpp during Doxygen preprocessing. This produces the same indistinguishable warning: Found ';' while parsing initializer list! as what were being caused by the __attribute__ syntax, but this time due to the *_ABI_EXPORT_CDECL() function macro being undefined at point of use (according to Doxygen). It seems adding the v_noabi paths to INCLUDE_PATH (mirroring the actual include paths used by the libraries themselves) is sufficient to clear up Doxygen's confusion. See doxygen/doxygen#11501 for more details.

@eramongodb eramongodb requested a review from kevinAlbs March 17, 2025 21:48
@eramongodb eramongodb self-assigned this Mar 17, 2025
@eramongodb eramongodb merged commit c386647 into mongodb:master Mar 18, 2025
21 checks passed
@eramongodb eramongodb deleted the cxx-docs branch March 18, 2025 15:04
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

Successfully merging this pull request may close these issues.

2 participants