Error with mocs in compiling kdevelop

Alexander Neundorf neundorf at kde.org
Fri Aug 11 19:45:24 UTC 2006


On Friday 11 August 2006 01:48, Eric Pignet wrote:
> Hello,
>
> I have an error when compiling kdevelop svn. A kopete developer with whom I
> talked has exactly the same error.
> I use last cmake version, as given in
> http://developer.kde.org/build/trunk.html

So cmake 2.4.3 ?

> I compiled qt-copy and kdelibs successfully.
> But when trying to compile kdevelop, I get the following error:
>
> make[2]: *** No rule to make target « lib/weaver/Job.moc », needed by «
> lib/weaver/CMakeFiles/ThreadWeaver.dir/Job_moc.o ».
> make[2]: *** no rule to make target « lib/weaver/Thread.moc », needed by «
> lib/weaver/CMakeFiles/ThreadWeaver.dir/Thread_moc.o ».
>
> Indeed, I have in the output:
> [  2%] Generating Job_moc.cpp
> [  2%] Generating Thread_moc.cpp
> (mocs of cpp files, generated thanks to additional add_custom_commands),
> but I have *not*:
> [  2%] Generating Job.moc
> [  2%] Generating Thread.moc
> And yet these mocs should have been detected by macros in CMakeLists.txt:
> kde4_automoc(Job.cpp ${ThreadWeaver_LIB_SRCS})
> kde4_automoc(Thread.cpp ${ThreadWeaver_LIB_SRCS})
>
> I added some trace messages in kde4_automoc macro and I see that includes
> of both missing mocs are well detected and that add_custom_commands are
> called. But no target is generated in makefiles...
>
> An idea ?

I had a quick look at the sources.
Neither Job.cpp nor Thread.cpp are listed as a source file for the library.
Why ?
And the generated Job_moc.cpp and Thread_moc.cpp include Job.moc and 
Thread.moc ?
Job_moc.cpp and Thread_moc.cpp do not exist yet at cmake time, so if these 
generated files will include Thread.moc/Job.moc this cannot be detected at 
this time.

I don't really understand how the logic behind this.
Can you please explain ?

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the KDevelop-devel mailing list