RFC: automoc changes
Laurent Montel
montel at kde.org
Mon Nov 6 09:17:53 CET 2006
On Sunday 05 November 2006 13:48, Alexander Neundorf wrote:
> Hi,
{......}
Hi,
> I see three options:
> 1) disabled by default and require the argument AUTOMOC:
> kde4_add_executable(kblub AUTOMOC ${mySrcs} ) # with automoc
> kde4_add_executable(kblah ${myOtherSrcs} ) # no automoc
>
> pro: cmake will only do what it's explicitely told
> con: all kde4_add_*() calls have to be adjusted
When we look at CMakeLists.txt into kde project we can see that all program
have a automoc (I didn't see a lot of cmakelists.txt which have not a automoc
macro)
=> for me it will better to use a NO_AUTOMOC argument to disable it.
> 2) enabled by default and require NO_AUTOMOC for disabling it:
> kde4_add_executable(kblub ${mySrcs} ) # with automoc
> kde4_add_executable(kblah NO_AUTMOC ${myOtherSrcs} ) # no automoc
> pro: no need to modify all kde4_add_*() calls
> con: cmake will do something implicitely, which I don't really like
>
> 3) use a variable which will decide whether the functions will use automoc
> or not:
> set(KDE4_AUTOMOC TRUE)
> kde4_add_executable(kblub ${mySrcs} ) # with automoc
> set(KDE4_AUTOMOC FALSE)
> kde4_add_executable(kblah ${mySrcs} ) # no automoc
I don't like it, because we must set/unset variable, and it's easy to forgot
to unset it into same CMakeLists.txt
> pro:
> -no need to modify all kde4_add_*() calls
> -slightly faster at cmake time than 1) and 2)
> con:
> -using an explicite argument instead of a global variable to influence the
> behaviour is easier to document and understand
>
> So, any opinions on this ?
>
> Bye
> Alex
>
> Btw. can we please archive this mailing list on lists.kde.org ?
Regards.
More information about the Kde-buildsystem
mailing list