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

Draft: Make internal includes work independent of the include search path(s) #625

Closed

Conversation

vkrause
Copy link
Member

@vkrause vkrause commented Feb 21, 2023

This is necessary in order to be able to remove include/Quotient from the include search path to force namespaced includes in consumer code.

This is still vastly incomplete on the non-generated header files, so consider those only as an example. The real blocker however are the includes to referenced types in the generated headers.

…h(s)

This is necessary in order to be able to remove `include/Quotient` from
the include search path to force namespaced includes in consumer code.

This is still vastly incomplete on the non-generated header files, so
consider those only as an example. The real blocker however are the
includes to referenced types in the generated headers.
@KitsuneRal
Copy link
Member

The more I look at it, the more I think of "just" renaming the sources folder lib to Quotient so that all headers could use either #include "Quotient/...." or #include <Quotient/....>, depending on the context. That is not backwards-compatible, of course, but less of a hassle for generated headers in particular.

@KitsuneRal KitsuneRal self-assigned this Feb 26, 2023
@KitsuneRal KitsuneRal added enhancement A feature or change request for the library building/packaging Issues with CMake files or packaging labels Feb 26, 2023
@vkrause
Copy link
Member Author

vkrause commented Feb 26, 2023

The more I look at it, the more I think of "just" renaming the sources folder lib to Quotient so that all headers could use either #include "Quotient/...." or #include <Quotient/....>, depending on the context. That is not backwards-compatible, of course, but less of a hassle for generated headers in particular.

This can be done in a source-compatible way as well I think, if we assume consumer code uses either our CMake config file or the pkgconfig file. There we can add $prefix/Quotient to the search path as well, so consumer code keeps working (with an opt-out option for consumer code that uses namespaced includes everywhere). If that's acceptable I can work into that direction as well.

@KitsuneRal
Copy link
Member

Yes, thanks, let's go in this direction. Meanwhile, I updated GTAD a bit to normalise include paths. This is not directly helping anything on the current issue, so JFYI.

@vkrause vkrause mentioned this pull request Mar 1, 2023
@KitsuneRal
Copy link
Member

Preempted by #626.

@KitsuneRal KitsuneRal closed this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building/packaging Issues with CMake files or packaging enhancement A feature or change request for the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants