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

When adding headers to SYSTEM in target_include_directories warnings for those are still shown #233

Closed
graph opened this issue Nov 4, 2016 · 6 comments
Labels

Comments

@graph
Copy link

graph commented Nov 4, 2016

e.g.

target_include_directories(helloLib
    PUBLIC
        # your include directories
        src/my/local/headers
    SYSTEM
        /some/path/to/headers
)

The path to headers in system in in the android directory. According to all documentation I've read anything after SYSTEM, the warnings should be disabled for those headers. In other words it should put -isystem instead of -I. All warnings shows for me though which hides warnings in my project completely.

@DanAlbert
Copy link
Member

What are you adding to system headers that's giving warnings? From my reading of this, this is a cmake bug and has nothing to do with the NDK.

The only case I can think of where we might be causing the problem here is if the headers you're adding to SYSTEM are NDK headers, and we've added them internally via -I.

@graph
Copy link
Author

graph commented Nov 4, 2016

I have libraries, that I don't want to see warnings in their header files. So I'm adding those to the SYSTEM section. Some of the libraries generate include files which I put inside the build folder. Then reference that folder after SYSTEM.

@DanAlbert
Copy link
Member

Okay, if this doesn't have anything to do with the NDK you should file a bug against CMake.

@graph
Copy link
Author

graph commented Nov 7, 2016

ok I see thank you. I submitted to cmake bug reporter here. Something new somewhere has been introduced. I'm getting so much warnings it takes android studio a few minutes to parse. Should the NDK headers be added with -isystem internally? isystem for NDK headers makes sense to me over -I.

@DanAlbert
Copy link
Member

The NDK headers are added using --sysroot, which should have the same behavior as -isystem.

But now I'm confused. I thought you said it was your headers, not the NDK headers.

@graph
Copy link
Author

graph commented Nov 7, 2016

Yes it's my headers. NDK headers are fine. I have so much warnings from my own headers I don't notice any NDK warnings. Ndk warnings look good and as expected. I was just asking to know better how things are setup.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants