Automatic recording of required packages...
David Faure
faure at kde.org
Mon Nov 8 10:51:22 CET 2010
On Wednesday 03 November 2010, Alexander Neundorf wrote:
> -- Package FOO was not found !
> and then cmake continues.
> Let's say now it hits a place which would trigger the error "variable is
> set to NOTFOUND but used".
> What should it do ?
> Ignore it, since a find_package() failed ?
> This would mean also ignoring it if it is for an unrelated variable from
> another find-module.
> Would you think that's ok ?
If the summary at the end of the build says "the following required packages
were not found: FOO, BAR", then the user will have to install these before he
can run configure again, and finally see (if it's still there) the error about
an unrelated variable. So I would say this is ok, yes -- but I can see how
this is only ok when the "summary at end of build" is shown. This is exactly
why I was saying cmake should do that automatically, so that people can't
forget to do it :-)
> But also other things can go wrong when skipping the "REQUIRED" argument:
> find_package(FLEX)
> execute_process(COMMAND ${FLEX_EXECUTABLE} -some -weird -arguments)
Well, this already goes wrong, nothing new there. It's just that fixing this
can either be done by adding REQUIRED and stopping there, or by adding an if()
and showing errors at the end.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
More information about the Kde-buildsystem
mailing list