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) 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.
Yes. 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}. Alex
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers