sakra/cotire — pull request #30 by gjasny (2014-06-15 08:07:33+00:00)
Title: Preserve system flag for includes when generating PCH

Hello,

the following adds support for -isystem include path handling for PCH generation. It worked for me in my test cases but please trim it to shape before merging.

Note: System include paths must start with / otherwise the code will not work.

--

If the compiler understands system include paths it exposes the
necessary flag within the CMAKE_INCLUDE_SYSTEM_FLAG_${LANG}
variable.

System include paths for targets could be queried via the target
property INTERFACE_SYSTEM_INCLUDE_DIRECTORIES. Here the system
include paths are listed in addition of being available in
the INTERFACE_INCLUDE_DIRECTORIES property.

Note: Currently there is no way to query the SYSTEM flag for
directory include properties.