[CMake] What to cache and what not

Andreas Pakulat apaku at gmx.de
Sat Oct 18 12:20:17 EDT 2008


On 18.10.08 18:01:51, Alexander Neundorf wrote:
> On Saturday 18 October 2008, Andreas Pakulat wrote:
> > Hi,
> >
> > I'm a bit confused from readme.txt in the Modules directory, regarding
> > which variables in a FindFoo.cmake or in my case FooConfig.cmake should
> > be cached.
> >
> > I'm going to provide a Foo_INCLUDE_DIR and a couple of Foo_LIBX_LIBRARY
> > variables and I'm wondering wether I should cache both or not?
> 
> If coming from a FooConfig.cmake file I'd say they don't hae to go into the 
> cache (just IMO).
> The cache helps avoiding searching the disk (not the case here) and enables 
> the user to adjust the settings if not found correctly automatically (doesn't 
> apply with FooConfig.cmake I'd say).

Hmm, well thats true for the include-dir which is indeed just set().
However for the libraries I still need the find_library call (using PATHS
right now, but will switch to HINTS when cmake 2.6.2 is required for KDE)
so I get a proper absolute path to the right library file. So I guess for
those I should still use the cache, right?

Andreas

-- 
Are you sure the back door is locked?


More information about the CMake mailing list