When using CMake's include_directories
command, there is a way to specify whether a given directory is a system include directory.
For various reasons, though, I have to resort to using set_target_properties
to specify different include paths for different targets in the same scope, by setting INCLUDE_DIRECTORIES
property of the target.
The problem is, however, that I could not figure out how to tell CMake that a directory is a system directory so it uses -isystem
instead of -I
when possible. Mainly because the property is simply a list of directory paths and does not have any flags.
I thought there could be SYSTEM_INCLUDE_DIRECTORIES
, but I could not find any mention of that.
Any thoughts on how to go about this?