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

Incorrect expansion of macros with ; by CMake for doxygen PREDEFINED #5193

Closed
albert-github opened this issue Jan 28, 2025 · 1 comment · Fixed by #5195
Closed

Incorrect expansion of macros with ; by CMake for doxygen PREDEFINED #5193

albert-github opened this issue Jan 28, 2025 · 1 comment · Fixed by #5195
Labels
type:Documentation Documentation improvement or change

Comments

@albert-github
Copy link
Contributor

Description

I was looking at issue #4161 to get a bit of a feeling for it, and saw the definition (so another problem):

itkBooleanMacro(EnforceConnectivity);

Which should result in 2 functions:

EnforceConnectivityOn
EnforceConnectivityOff

In the C++ code (itkMacro.h) we see this happening, but in the documentation there is no trace of EnforceConnectivityOff.

Expected information

The function EnforceConnectivityOff is present as well

Actual information

The function EnforceConnectivityOff is missing

Versions

master 5df209f

Additional Information

In the DoxygenConfig.cmake we see (with PREDEFINED):

"itkBooleanMacro(name)=                   virtual void name##On ();                   virtual void name##Off ();"

and when running this through cmake we see:

"itkBooleanMacro(name)=                   virtual void name##On ()" "                   virtual void name##Off ()"

Note: the ; are gone and it are 2 strings, so doxygen will not see the Off version. The solution for it is to escape the ; like:

"itkBooleanMacro(name)=                   virtual void name##On ()\;                   virtual void name##Off ()\;"

Note this will give in the mentioned case:
virtual void EnforceConnectivityOn(); virtual void EnforceConnectivityOff();;
as in the C++ code there is a ; behind the the used macro, this is not a problem as doxygen will ignore the empty statement.

@albert-github albert-github added the type:Documentation Documentation improvement or change label Jan 28, 2025
@albert-github
Copy link
Contributor Author

Proposed patch: diff.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Documentation Documentation improvement or change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant