Confusing bail-out messages
Allen Winter
winter at kde.org
Sun Oct 15 22:33:09 CEST 2006
On Sunday 15 October 2006 04:49, Adriaan de Groot wrote:
> As usual, I fired up CMake without setting up my build environment properly,
> and got this:
>
> CMake Error: Error in cmake code at
> /usr/local/KDE4/share/apps/cmake/modules/FindQt4.cmake:1048:
> MESSAGE Qt qmake not found!
> Current CMake
> stack: /home/adridg/KDE/kdepim/CMakeLists.txt;/usr/local/share/CMake/Modules/CMakeCInformation.cmake;/usr/local/share/CMake/Modules/CMakeCXXInformation.cmake;/usr/local/share/CMake/Modules/FindKDE4.cmake;/usr/local/KDE4/share/apps/cmake/modules/FindKDE4Internal.cmake;/usr/local/KDE4/share/apps/cmake/modules/FindQt4.cmake
>
>
I have a CMake "wish" (in the official cmake bugzilla) for a simple EXIT() command.
So, I'd rewrite:
MESSAGE(FATAL_ERROR "Qt qmake not found!")
as:
MESSAGE(STATUS "Unable to locate Qt qmake. Please check your Qt installation and/or execute PATH")
EXIT(1)
the EXIT() command would not print the CMake stack or any other internals: it would
simply exit cmake with a status code. Which I think is much more user friendly.
> For once, though, I actually read the messages, and it strikes me that they
> are somewhat confusing when taken at face value. For one thing, there is no
> error in the cmake code: it's a error during configuration because the cmake
> code has *detected* an error. It might be useful to make the bail-out message
> a little more verbose with some MESSAGE( STATUS ... ) strings (I'll try to
> remember to do that on monday to avoid the wrath of everyone).
>
> The other thing is the stack: it'd be useful to include line numbers in the
> trace and/or format it like the gcc "error in file F, included from F' ..."
> error listing.
>
More information about the Kde-buildsystem
mailing list