[CMake] Does FIND_PACKAGE ignore REQUIRED and QUIET in Config mode ?

Andreas Pakulat apaku at gmx.de
Fri Sep 5 18:32:03 EDT 2008


On 05.09.08 16:13:21, Brad King wrote:
> Alexander Neundorf wrote:
> > On Friday 05 September 2008, Yann Cointepas wrote:
> I do not recommend searching for required dependencies inside
> "FooConfig.cmake".  The process that put it there in the first place
> should have hard-coded inside it the locations of all dependencies.  If
> it comes with a system package file (like a .deb), then that file should
> have a dependency on the boost package and know where it will be
> installed.  If it comes from the user having built and installed Foo,
> then that build/install process should have found boost on the machine
> already.  Using a different boost could lead to problems, so the
> location should be hard-coded.

I kind of disagree :) Hardcoding the location doesn't really by you any
security wrt. that library being usable. At a later point in time it
could be overwritten with an incompatible version, that has the same
name. Which also leads to problems, pretty much the same when trying to
use a newer incompatible version of the library for a app/lib compiled
against an older version by getting the find-process to use a different
path.

Hardcoding the path is nice though to not having to go through the
find-the-library loop all the time and to be on the safe side as long as
the library devs play by the rules.

Unless of course I'm missing some important piece :)

Andreas

-- 
You are a very redundant person, that's what kind of person you are.


More information about the CMake mailing list