Dear All,

I've already talked about this a bit back in December.

https://cmake.org/pipermail/cmake-developers/2015-December/027197.html

I looked at this issue today again, as in our builds we can be seriously 
hampered by "cmake -E cmake_depends" calls. And then, by the huge dependency 
trees that these calls create. To give you a sense of the extent of the issue: 
While compiling just a few files against our full software build (we have a 
relatively complicated build setup allowing us to build small parts of our code 
against a nightly build of our full release), I get a depend.cmake file almost 
9 MBs large.

With the following patch, when setting the CMAKE_ONLY_IN_SOURCE_DEPENDENCIES 
variable to 1/ON/TRUE, this file size goes down to just a few kilobytes. 
Speeding up our build noticeably.

As far as I can see, the "cmake -E cmake_depends" call is only used by the 
Makefile generator at the moment. So I only taught that generator about this 
new variable. I just didn't see what I should do in the Ninja generator for 
instance to apply this setting. Even though I would be very interested in 
implementing the feature in that generator as well.

I know that the code is not at all generic enough right now. But even at 
limited functionality, it may already be useful to a few other people as well.

Cheers,
           Attila

Attachment: 0001-CMAKE_ONLY_IN_SOURCE_DEPENDENCIES-feature-addition.patch
Description: Binary data

-- 

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

Reply via email to