On Thursday 05 June 2008, Alexander Neundorf wrote:
> On Thursday 29 May 2008, Matthias Kretz wrote:
> > On Thursday 29 May 2008, Alexander Neundorf wrote:
> > > On Wednesday 28 May 2008, Matthias Kretz wrote:
> > > > I tried add_custom_target and it won't work in the automoc macros
> > > > because there needs to be a dependency from the main target to the
> > > > automoc target. And that cannot be added from the automoc macro
> > > > because the main target is not defined at this point.
> > > >
> > > > add_custom_command(TARGET has the same problem.
> > > >
> > > > It would be possible to use add_custom_target and require the user to
> > > > add the dependency between the two targets himself. In the KDE4_
> > > > macros we could do that...
>
> Yes, there it wouldn't be a problem.
> Except that it is a bit slower, right ?

It's hard to profile. But it certainly has to read and write a lot more files 
if you double the number of targets in a project. It should be noticable on 
big modules like kdelibs and kdebase. Small modules won't notice it, I think.

> Do you think this would be acceptable for other projects ?

It being slower or the need to add a dependency rule for a target that fell 
from the sky?

Hmm, perhaps the target could be made explicit:

add_automoc4_target(phonon_automoc phonon_SRCS)
add_library(phonon ${phonon_SRCS})
add_dependencies(phonon phonon_automoc)

kde4_add_library/executable/plugin would hide all that.

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
[EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to