doxygen: predefine non-standard specifiers and fix include paths #1355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 bybsoncxx/config/prelude.hpp
during Doxygen preprocessing. This produces the same indistinguishablewarning: 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 thev_noabi
paths toINCLUDE_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.