[CMake] Customize dependencies scanned by CMake

Alexey Livshits livchits at web.de
Mon Jan 17 10:49:30 EST 2011


It looks that precompiled headers should help here.

2011/1/17 David Cole <david.cole at kitware.com>:
> See this command:
> http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_regular_expression
>
> If you can match many of the "header files that rarely, if ever, change"
> with a regular expression based on directory and file name patterns, then
> you can reduce the number of entries in the generated makefiles
> significantly.
>
>
> HTH,
> David
>
>
> On Sat, Jan 15, 2011 at 7:57 AM, Dieter Oberkofler
> <doberkofler.lists at gmail.com> wrote:
>>
>> I'm using CMake 2.8.3 using makefiles for the OSX and Windows platform.
>>
>> I very much like CMake but unfortunately the build performance
>> consistently
>> causes some problems.
>>
>> And the main performance problem is the absolutely correct but painfully
>> slow dependency checking.
>> In a large (Qt/C++) project a single source file has over 1500 include
>> dependencies summing up to a "depend.make" file with several million
>> lines.
>> Almost all (typically 99%) of the include dependencies are not needed in
>> real life because they come from Qt or other static frameworks but
>> dramatically slow down the build process.
>>
>> I do know that CMake offers the /fast option but this removes all
>> dependencies and although it is 3-5 times faster, manually "optimizing"
>> the
>> content of "depend.make" makes the build up to 20 times faster.
>> Why is the /fast option not (at least) as fast as a manually "optimized"
>> "depend.make"?
>>
>> Is there a way to:
>> - customize what includes should be parsed?
>> - exclude dependency trees?
>> - limit the recursion level?
>>
>> or any other option to solve this problem?
>>
>> Thank you!
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
BG,
Alexey


More information about the CMake mailing list