How to specify system include directories as `-isystem` in CMake

I thought any paths that CMake detected as default header search paths were already treated as system. In fact, I thought it removed such paths from the header search path even if you explicitly added them. I might be recalling incorrectly though. Perhaps @ben.boeckel might be able to confirm that behavior?

If you’re using the CentOS devtoolsets, then usually there are things set in your shell environment. I don’t recall the exact command that does this, but if you use devtoolsets often, you probably know what I’m talking about. You must set the full environment that way, not just pull out the compiler paths only, from what I recall. That may be affecting what CMake sees as default system paths, if you’re not setting up the environment properly.