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

[OpenEXRCore] angle bracket includes within the OpenEXR library should have an OpenEXR/ prefix #1095

Open
anderslanglands opened this issue Jul 16, 2021 · 6 comments
Labels
Bug A bug in the source code

Comments

@anderslanglands
Copy link

https://github.com/kdt3rd/openexr/blob/017f056239e817cbe2ab601efe99dc9f4c9e7f52/src/lib/OpenEXRCore/openexr_conf.h#L10

Is there a reason to use angled brackets for including headers rather than quotes? This appears to break clang. I can work around it by passing both -I${OPENEXR_ROOT}/include and -I${OPENEXR_ROOT}/include/OpenEXR but this is a bit hacky.

@meshula
Copy link
Contributor

meshula commented Jul 17, 2021

That's typical for ASWF libraries and ASWF adjacent libraries. Like OIIO for example, uses angle brackets. If you're noticing an issue with OpenEXR in particular, is it because other libraries like OIIO are installed site wide, and you've got a -I for your site headers, but OpenEXR is not in the site wide location?

@lgritz
Copy link
Contributor

lgritz commented Jul 17, 2021

But it's not supposed to be "bare".

#include <OpenEXR/OpenEXRConfig.h>

is fine. But

#include <OpenEXRConfig.h>

is not going to find it in the include directory.

@anderslanglands
Copy link
Author

anderslanglands commented Jul 17, 2021 via email

@meshula
Copy link
Contributor

meshula commented Jul 17, 2021

Ah, I'll update the issue title.

@meshula meshula changed the title [OpenEXRCore] use of angled brackets for local includes instead of quotes [OpenEXRCore] angle bracket includes within the OpenEXR library should have an OpenEXR/ prefix Jul 17, 2021
@meshula meshula added the Bug A bug in the source code label Jul 17, 2021
@cary-ilm
Copy link
Member

I'm not entirely sure the correct solution here. #1097 changes the <> to "" inside of all exported headers, for the few files that were using <>. #include <OpenEXR/OpenEXRConfig.h> does not work; it might work in application code, but it doesn't work in building OpenEXR itself.

OpenEXR.pc includes both -I -I<include/OpenEXR>, which I think we did for backwards compatibility.

What about includes of Imath from inside OpenEXR headers? We're inconsistent, with some included via "" and others with <>. Should they all be ""?

@anderslanglands
Copy link
Author

anderslanglands commented Jul 18, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the source code
Projects
None yet
Development

No branches or pull requests

4 participants