mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
When 033dc7ee2f introduced
`AddSystemIncludeDirectory()`, the function was not handling the
situation which a system include cache key is not added properly like
in `IsSystemIncludeDirectory()`. The error was not exposed when
`AUTOMOC` is `ON` and `AUTOUIC` is `ON` because
`GetIncludeDirectoriesImplicit()` inside `initMoc()` was triggering
`IsSystemIncludeDirectory()`.
This commit adds calling
`AddSystemIncludeCacheKey()` inside `AddSystemIncludeDirectory()`
when the system include cache key is not added before.
Fixes: #26146