Google Test System Includes

Google test is using system interface includes. This does not work for my project/build, so I am trying to not have those interface includes be -isystem. I did the following…

set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
add_subdirectory(googletest)

Instead I’ve had to resort to just wiping out the system directories.

set_target_properties(gmock gtest PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "")

Unfortunately even clearing the target properties explicitly, system includes are still showing up…

Note this set and add_subdirectory is before adding my other targets as well. However, the INTERFACE includes of google test are still being used as -isystem. Any idea why?

After using

set_target_properties(gmock gtest gtest_main gmock_main PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "")

My issue seems to be resolved. But I still wonder why CMAKE_NO_SYSTEM_FROM_IMPORTED wasn’t working?