[cmake-developers] Making Config.cmake files safer
Alexander Neundorf
neundorf at kde.org
Sat Nov 12 14:48:05 EST 2011
On Saturday 12 November 2011, David Cole wrote:
> On Sat, Nov 12, 2011 at 12:23 PM, Alexander Neundorf <neundorf at kde.org>
wrote:
> > On Saturday 12 November 2011, Alexander Neundorf wrote:
> >> Hi,
> >>
> >> I added a branch CheckImportedFileExistenceInConfigDotCMakeFiles cmake
> >> stage.
> >
> > This is the commit:
> > http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=1b12babe0cef55a0
> > d5531a9d0d453a15598eb467
> >
> > Alex
> > --
> >
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
> I think it's a good idea, but I'm not 100% happy with the error message.
>
> "Imported file \\\"" << filename << "\\\" does not exist. Your
> installation is broken"
>
> is less helpful than I'd like to see...
>
> How about something like:
>
> "File 'filename' for imported target 'targetname' does not exist.
> Try re-installing 'projectname' or contact 'projectname's' developers
> (or mailing list)"
I committed a somewhat improved version.
The second sentence is the hard part. It now says "There must be a problem
with the installation of this package." , which is vague enough.
At that point in cmake we just know the filename of the file we are writing
to, which does not necessarily have a close relation to the name of the
package the user needs to install in his distro. Or under Windows...
Or I could add a full explanation what went wrong and possible reasons, but
this will be quite long for an error message.
Alex
More information about the cmake-developers
mailing list