[CMake] FIND_LIBRARY - always true - very strange...

Brad King brad.king at kitware.com
Wed May 11 14:37:45 EDT 2005


Christian Kienle wrote:
> I grepped the CMakeCache.txt and found the "problem".
> 
> cmks-Computer:/Volumes/Files/Users/cmk/cppp/cmksql/libloader cmk$ cat  
> CMakeCache.txt  | grep dl
> //Flags used by the linker during the creation of dll's.
> //Where can the dl library be found
> PATH_OF_LIB_DL:FILEPATH=/usr/lib/libdl.dylib
> 
> Just deleted this file and all begun again and worked.
> 
> But do I have to delete this file every time I want to test my build  
> process?

If you do an in-source build, yes.  If you do an out-of-source build 
then you just need to create a new build tree each time.

The idea of the cache is to save information that may not be easy to 
find.  Say for example the library cannot be found automatically at all 
because it is installed in some strange location.  The user must be able 
to specify the library location once when configuring a build tree the 
first time.  After that when CMake runs again the user should not have 
to provide this information again.  This is why it is saved in the cache.

-Brad


More information about the CMake mailing list