[cmake-developers] Proposal to teach cmDepends to only take dependencies from the source tree

Ben Boeckel ben.boeckel at kitware.com
Tue Dec 8 11:14:07 EST 2015


On Tue, Dec 08, 2015 at 10:09:13 +0100, Attila Krasznahorkay wrote:
> In the end I applied the following patch to CMake 3.4.1 locally to
> speed it up for my use case very significantly. Of course this is not
> a patch that could be applied to CMake for a general audience. But I
> do think that if this code/behaviour could be switched on using
> something like a directory property / global variable, a lot of users
> could make good use of it. As it can be a reasonable assumption in
> many development environments that only the changes inside of the
> source tree should be tracked by the build system.

So some projects allow you to override specific headers (e.g., Boost) to
provide <boost/config/user.hpp> which would be included from the source
tree. This file is not included directly by any users of Boost
(usually), but instead included via other Boost headers, so scanning of
system includes can be important.

So as long as there's an option/policy for it, I'm fine with the
behavior. A policy could make it the default too with a directory
property to re-enable global scanning.

Hmm…the build tree should also probably be allowed as well.

--Ben


More information about the cmake-developers mailing list