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

Alexander Neundorf neundorf at kde.org
Tue Dec 8 15:46:13 EST 2015

On Tuesday, December 08, 2015 11:14:07 Ben Boeckel wrote:
> 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) 
> provide <boost/config/user.hpp> which would be included from the 
> tree. This file is not included directly by any users of Boost
> (usually), but instead included via other Boost headers, so scanning 
> 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.

I think I have also seen projects where the "top level"-CMakeLists.txt is 
actually not at the root of the project, but in a subdir, e.g. cmake/.
In that case all source files are outside ${CMAKE_SOURCE_DIR}.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151208/8306c48c/attachment.html>

More information about the cmake-developers mailing list