CMAKE_DEPENDS_IN_PROJECT_ONLY

From Get docs
Cmake/docs/3.21/variable/cmake depends in project only


CMAKE_DEPENDS_IN_PROJECT_ONLY

New in version 3.6.


When set to TRUE in a directory, the build system produced by the Makefile Generators is set up to only consider dependencies on source files that appear either in the source or in the binary directories. Changes to source files outside of these directories will not cause rebuilds.

This should be used carefully in cases where some source files are picked up through external headers during the build.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_DEPENDS_IN_PROJECT_ONLY.html