When including external library headers in my C++ project I can use -isystem flag instead of -I (at least for GCC or Clang) to mark particular include directory as system libraries directory. This way compiler won’t report any warnings regarding the code of external libraries.
Is there any way to do this with OS X framework headers, which are not passed to compiler using -I flags but using -F flag pointing to the directory framework is located in?
Example
Compilation command:
clang++ -F/Users/user/CustomFrameworks -o test.o -c test.cpp
test.cpp
#include <Framework/Header.h>
// ....
Framework structure:
$ ls /Users/user/CustomFrameworks
Framework.framework
$ ls /Users/user/CustomFrameworks/Framework.framework/Headers
Header.h
How to ignore warnings from Header.h?
If only possible I’d rather not put any compiler-specific pragmas in my code.
Use the
-iframeworkflag. Sometimes reading man-pages helps…