MantisBT - CMake
View Issue Details
0014650CMakeCMakepublic2013-12-16 03:222016-06-10 14:31
Lars 
Kitware Robot 
normalminoralways
closedmoved 
CMake 2.8.12 
 
0014650: Depend.make content
Building our software is very slow using CMake 2.8.12.1 and VS2005. Debugging this issue I discovered the several of the depend.make files are huge. One example is a depend.make file that is roughly 10 MB. It appears the dependency scanner in cmake does not take into account preprocessor directive, so including one boost header in a translation unit can cause this translation unit to depend on several 100s of boost files. In our case, each translation unit dependent on 1000 or more boost header files.

Adding the following code solved the issue for boost;
include_regular_expression("^([^b]|b[^o]|bo[^o]|boo[^s]|boos[^t]|boost[^/]).*$")
(this line reduced the build time by more than 50%)

This is is a limited solution because it only works on part of the header path.
We have other third party tools that we would like to filter out of the depend.make file, for instance Qt. How do we accomplish that?

A suggestion from Nils Gladitz;
"Maybe CMake could filter out includes in system directories (like gcc -MM does). System directories in this case could be directories added with e.g. include_directories(SYSTEM)."
No tags attached.
related to 0014648closed Kitware Robot Need an option to skip system headers while generating dependencies 
Issue History
2013-12-16 03:22LarsNew Issue
2013-12-18 11:07Brad KingRelationship addedrelated to 0014648
2016-06-10 14:29Kitware RobotNote Added: 0042449
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042449)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.