View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001617CMakepublic2005-02-23 18:222005-02-24 12:46
ReporterAlex Neundorf 
Assigned ToBill Hoffman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001617: dependlocal forced for generated moc files -> exceedingly long build times
DescriptionHi,

I'm trying to build kdevelop with cmake and with some custom macros make runs very slow (not cmake), since it executes make dependlocal again and again. KDE uses Qt and Qt generates moc files.
In KDE they are often used this way:

foo.h:
class Foo:public QWidget {
Q_OBJECT
...
};

foo.cpp
...
#include "foo.moc"

cmake considers foo.moc a header and adds a rule like this to cmake.check_depends:
foo.moc:
   make dependlocal

make dependlocal needs a noticable time to execute, which adds up significantly if there are a lot of such files in a directory. Here on a fast box (2 GHz) in some directories something like one minute is spent just executing dependlocal again and again for each generated moc file.

Here you can see the macro I wrote for generating the moc files:

http://public.kitware.com/pipermail/cmake/2005-February/006095.html [^]

Then I found out the reason:

http://public.kitware.com/pipermail/cmake/2005-February/006110.html [^]

and finally Brad King responded:

http://public.kitware.com/pipermail/cmake/2005-February/006111.html [^]

So basically, the dependlocal rule shouldn't be added for files which are generated.

(foo.moc is generated from foo.h, and foo.cpp depends on foo.moc)

Would be nice if you could fix it for cmake 2.2 :-)

Bye
Alex
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0002112)
Brad King (manager)
2005-02-24 12:46

The new makefile generator currently in cmLocalUnixMakefileGenerator2.cxx does not have this bug. Since we will be switching to this generator soon there is no point in fixing this bug in the old generator. I'm closing the bug.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team