[cmake-developers] find_package without REQUIRED can cause fatal error now
Alexander Neundorf
neundorf at kde.org
Tue Jul 31 14:30:21 EDT 2012
On Tuesday 31 July 2012, Bill Hoffman wrote:
> On 7/30/2012 3:38 PM, Alexander Neundorf wrote:
> > The idea was that this is a sign of a broken install.
> >
> > Can you uninstall the vtk-devel package (does this exist ?), because it
> > is broken, i.e. does not contain everything is claims to ?
> >
> > I understand that this is maybe not expected behaviour for an optional
> > package, but maybe Brad is right ?
> >
> > Alex
>
> Yes, VTK is broken on the machine, and we could fix the machine.
> However, this would be the first time we did a work around for the
> modules test by fixing the machine. I wonder if we could just disable
> fatal error at the start of find_package optional. Then turn it back on
> at the end. My concern is optional packages, maybe that is a rare case
> not sure.
One reason why I wanted it to be an error was to force people to fix their
install, make it is obvious that it is not the fault of the buildsystem of the
project being built, but of the package being used.
I'm not sure it is better to fail relatively silently in this case instead of
complaining loudly that the package is broken.
Users might wonder why it doesn't work, the devel package is installed, in the
right place, and still CMake doesn't pick it up.
I can have a look how to make it not an error if the find_package() is
optional, if we really want that.
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120731/bad83f94/attachment.html>
More information about the cmake-developers
mailing list