cmake EXEC_PROGRAM merges stdout and stderr?
David Faure
faure at kde.org
Fri Feb 3 15:55:33 CET 2006
On Friday 03 February 2006 15:36, Brad King wrote:
> David Faure wrote:
> > This warning line should obviously not be there. It's a warning by uic3, send to stderr.
> >
> > The uic3 command issued by cmake is:
> > cd /devel/kde/build/4/kdelibs4_cmake/kdeui && /devel/other/inst/bin/cmake -DKDE3_HEADER:BOOL=ON -DKDE_UIC_EXECUTABLE:FILEPATH=/devel/kde/src/4/qt-copy/bin/uic3 -DKDE_UIC_FILE:FILEPATH=/devel/kde/src/4/kdelibs/kdeui/kshortcutdialog_simple.ui3 -DKDE_UIC_H_FILE:FILEPATH=/devel/kde/build/4/kdelibs4_cmake/kdeui/kshortcutdialog_simple.h -DKDE_UIC_BASENAME:STRING=kshortcutdialog_simple -DKDE_UIC_PLUGIN_DIR:FILEPATH="." -P /devel/kde/src/4/kdelibs/cmake/modules/kde4uic.cmake
> > Running cmake script file /devel/kde/src/4/kdelibs/cmake/modules/kde4uic.cmake
> >
> > After adding debug output to cmake's cmExecProgramCommand.cxx (wow, nice, it's c++, no c as I thought I heard),
> > I see:
> > Executing command "/devel/kde/src/4/qt-copy/bin/uic3 -nounload -tr tr2i18n /devel/kde/src/4/kdelibs/kdeui/kshortcutdialog_simple.ui3"
> > which is correct, but what does cmake do with its stdout and stderr?
> > I see callbacks in cmSystemTools but I don't see one being set.... Any ideas?
>
> The EXEC_PROGRAM command was originally added in the early days of CMake
> in order to let people quickly convert autoconf projects by using
> EXEC_PROGRAM to run the configure script for all the try-compiles. In
> that application both the stdout and stderr were desired. Since then
> its use has been expanded incrementally and it was never really updated.
> It still uses a very old process-execution implementation that has
> some severe limits. Writing a new one that uses the robust process
> exection implementation used by ctest has been on the todo list.
Thanks for the info, but in practical terms, does this mean there is no way to
fix this problem without changing cmake itself?
Is there maybe something else than EXEC_PROGRAM (or something else than OUTPUT_VARIABLE)
which we can use to run a command and put its output into a file?
I guess adding " > foo.h" to the command won't work since there's probably no shell involved...
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Kde-buildsystem
mailing list