Extract folders from include_directories(SYSTEM)

How can i read these include directories later?

They are added to directory property INCLUDE_DIRECTORIES, but how do I know which ones where added with SYSTEM and which were not?

I think the only way is to query a target for its SYSTEM_INCLUDE_DIRECTORIES property and then do some set operations with the includes you’re interested in.

Can you share a link?
I can only find INTERFACE_SYSTEM_INCLUDE_DIRECTORIES and this is a target property.

Oh, that seems to be some internal thing then. So no, I don’t think there’s any available (or at least documented) API for that then. Please file an issue.

Done: https://gitlab.kitware.com/cmake/cmake/-/issues/22199