[CMake] Find preferentially in /usr/local/lib not working

Stephen Collyer scollyer at netspinner.co.uk
Fri Mar 28 07:02:03 EDT 2008


Timenkov Yuri wrote:

> Did you run this on clean build directory or CMakeCache.txt existed?
> If so, you should manually delete CURL_INCLUDE_DIR value from cache (or whole 
> cache).
> 
> The point is that once search variable is found in cache, cmake will never 
> look again for headers nor validate its value.  Therefore you can put 
> multiple find_path statements into single file.

OK, thanks, I now understand what's going on. I misunderstood what was
happening - I didn't realise that if a value was already in the cache
then the *first* FIND_PATH is ignored as well. It's been so long since
I changed my setup that I'd forgotten this. If I clear the cache then
I can indeed find the stuff in /usr/local preferentially.

However, this is a pain - I'd rather have cmake reconstruct the cached
FIND_PATH values each time I run it, without my having to remove it
or alter it manually - is that possible ?

-- 
Regards

Steve Collyer
Netspinner Ltd


More information about the CMake mailing list