Fixing output of new automoc macro

Matthias Kretz kretz at kde.org
Wed Jul 4 20:00:00 CEST 2007


On Wednesday 04 July 2007, Andreas Pakulat wrote:
> Who cares? The normal cmake output is explicitly short so you're not
> cluttered with uninteresting details the important thing is that a .moc
> file is generated. Same thing for .ui files or even compilation of
> source files. Such extended information can be shown in VERBOSE mode,
> but IMHO not in standard mode. Its at least two lines in a standard
> terminal and that is close to unreadable, at least I find that
> unreadable so the information is useless for me anyway because I don't
> look at it.

How about:
Index: kde4automoc.cmake
===================================================================
--- kde4automoc.cmake   (revision 683192)
+++ kde4automoc.cmake   (working copy)
@@ -10,7 +10,11 @@
    set(_moc ${KDE4_CURRENT_BINARY_DIR}/${_current_MOC})

    if ("${_moc_source}" IS_NEWER_THAN "${_moc}" OR _force_moc)
-      message(STATUS "Automoc: Generating ${_moc} from ${_moc_source}")
+      if($ENV{VERBOSE})
+         message(STATUS "Automoc: Generating ${_moc} from ${_moc_source}")
+      else($ENV{VERBOSE})
+         message(STATUS "Generating ${_current_MOC}")
+      endif($ENV{VERBOSE})
       execute_process(COMMAND ${QT_MOC_EXECUTABLE} 
${QT_MOC_INCS} "${_moc_source}" -o "${_moc}")
    endif ("${_moc_source}" IS_NEWER_THAN "${_moc}" OR _force_moc)
 endmacro (generate_moc)


results in:

kdevel at Epsilon3% make phonon
[  0%] Generating phonon.automoc
-- Generating moc_abstractmediastream.cpp
-- Generating moc_mediaobject.cpp
-- Generating moc_audiopath.cpp
-- Generating moc_videopath.cpp
-- Generating moc_effect.cpp

kdevel at Epsilon3% VERBOSE=1 make phonon
[snip]
-- Automoc: 
Generating /home/kdevel/KDE/obj/kdelibs/phonon/moc_abstractmediastream.cpp 
from /home/kdevel/KDE/src/kdelibs/phonon/abstractmediastream.h
-- Automoc: Generating /home/kdevel/KDE/obj/kdelibs/phonon/moc_mediaobject.cpp 
from /home/kdevel/KDE/src/kdelibs/phonon/mediaobject.h
-- Automoc: Generating /home/kdevel/KDE/obj/kdelibs/phonon/moc_audiopath.cpp 
from /home/kdevel/KDE/src/kdelibs/phonon/audiopath.h
-- Automoc: Generating /home/kdevel/KDE/obj/kdelibs/phonon/moc_videopath.cpp 
from /home/kdevel/KDE/src/kdelibs/phonon/videopath.h
-- Automoc: Generating /home/kdevel/KDE/obj/kdelibs/phonon/moc_effect.cpp 
from /home/kdevel/KDE/src/kdelibs/phonon/effect.h

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070704/b4923864/attachment.pgp 


More information about the Kde-buildsystem mailing list