[cmake-developers] Bad error message when a package could not be found - make find_package() not search config files by default

Alexander Neundorf neundorf at kde.org
Thu Feb 16 11:13:28 EST 2012


On Thursday 16 February 2012, Brad King wrote:
> On 2/16/2012 10:30 AM, Alexander Neundorf wrote:
> >> In any of the above modes the error message can be more explicit.
> >> It is up to the author of the project to choose to do this.  I do
> >> not want it to be required.
> > 
> > Here we disagree. I think it should be required, to avoid the impression
> > "finding packages with cmake is a total mess" among users who don't know
> > the details of cmake package searching.
> 
> I'm not opposed to trying to make the messages easier to understand,
> but I do not want to require every project to change almost every
> find_package call and generate a policy warning about every call in
> every old project release.

My impression is that config.cmake files are not yet wide spread.

At least I am sure that they will become much much more widespread than they 
are now. E.g. what is now known as kdelibs, is currently in the process of 
being split into 10 or 20 separate libraries, each of them will install one 
config file.
I mean, it may not be problem yet, because maybe 90 percent of the 
find_packages() calls use Find-modules, but I am quite sure it will become 
one.

> As I said in the part of my message you did not quote in the response
> the problem is the error message does not know who is reading it.  If
> we can solve that problem then we can make the message say what the
> reader needs to see.

Yes.
I just couldn't imagine a useful way.

Alex



More information about the cmake-developers mailing list