function(addSystemHeadersToTarget target header_dirs)
  if (MSVC AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
    foreach (include_dir ${header_dirs})
      if (NOT (include_dir STREQUAL "$<INSTALL_INTERFACE:include>"))
        target_compile_options(${target} PRIVATE "SHELL:/imsvc\ \"${include_dir}\"")
      endif()
    endforeach()
  else()
    target_include_directories(${target} SYSTEM PRIVATE ${header_dirs})
  endif()
endfunction()
