When adding headers to SYSTEM in target_include_directories warnings for those are still shown
In cross compiling environment for example:
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 obfuscates warnings in my project completely.
bin$ ./cmake --version
cmake version 3.6.0-rc2
I haven't tested on latest version of cmake I see is somewhere on 3.7. This seams like something new has been introduced recently as I didn't experience it before. I checked verbose compiling and everything after SYSTEM
is added with -I
option which means all warnings for those headers are shown. That's alot of warnings for me. I have seen a bug regarding Xcode with a similar case. I'm using Android studio which uses Ninja as a generator.
Thank you.