Review Request: properly pass the NOGUI flag

Alexander Neundorf neundorf at kde.org
Tue Jul 31 18:34:56 UTC 2012


On Tuesday 31 July 2012, Stephen Kelly wrote:
> On Monday, July 30, 2012 21:51:02 Alexander Neundorf wrote:
> > On Monday 30 July 2012, David Faure wrote:
> > > On Monday 30 July 2012 04:20:18 Raphael Kubo da Costa wrote:
> > > > As for "who uses NOGUI",
> > > > http://lxr.kde.org/search?filestring=&string=kde4_add_unit_test+NOGU
> > > > I
> > > 
> > > NOGUI seems to be missing in KDE Frameworks / extra-cmake-modules
> > > though.
> > > (unrelated to this review request, but it reminded me to bring this up)
> > 
> > The idea is that this is not necessary anymore.
> > Instead there is a global flag to enable the GUI stuff for Windows and
> > OSX, added to cmake in 2.8.8.
> > 
> > Stephen, is this right ?
> 
> Yes, but what David wants is the opposite. We globally set
> 
> set(CMAKE_WIN32_EXECUTABLE ON)
> 
> in kde-modules/KDECMakeSettings.cmake
> 
> and the macro in modules/ECMMarkNonGuiExecutable.cmake
> 
> can be used to disable it. So, replace NOGUI with
> 
> ecm_mark_nongui_executable(the_target)

Not sure I like that. This is again a wrapper around one function call:

set_target_properties(${_target}
                      PROPERTIES
                      WIN32_EXECUTABLE FALSE
                      MACOSX_BUNDLE FALSE
                     )

Can we do this in some other way ?
Somewhere do something like this:
set(TARGET_NOGUI_PROPERTY WIN32_EXECUTABLE FALSE
                          MACOSX_BUNDLE FALSE)

and then use it:
set_target_properties(${_target}
                      PROPERTIES ${TARGET_NOGUI_PROPERTY}
                     )

Not sure this is easier.

We had a nicer API with our kde4_add_executable(...) macro. There we could add 
switches as we wanted.
I don't think we should add some macro for setting a single target property.

Also, when adding new files to e-c-m, its version number should be increased 
and the higher version should be made required where it is used.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20120731/c2d6042a/attachment.html>


More information about the Kde-buildsystem mailing list