[CMake] Find_Library question
Bill Hoffman
bill.hoffman at kitware.com
Thu Mar 4 08:21:15 EST 2010
Surya Kiran Gullapalli wrote:
> Hello all,
> I'm using Find_Library call at several places to locate libraries.
>
> The document says if Find_Library finds the library it stores the path
> in a cache variable, and Find_Library does not gets called again for the
> variable.
>
> Now If I run configure, Find_Library seems to be trying to find the
> library again. What I expect is, CMake first reads the CMakeCache.txt
> file, and then calls Find_Library. Now that variable is cached,
> Find_Library should not be trying to find the library again.
>
> I've a set of .cmake scripts and include them in master file using
> Include call. Most of the .cmake files contain Find_Library calls and
> nothing else. What I've observed is, CMake is taking longer to configure
> with these cmake scripts included. If I comment them out then configure
> is pretty fast. As these .cmake files contain Find_Library and nothing
> else, I feel Find_Library is trying to find library again and again. Am
> I missing something here ?
>
> I'm using Cmake-2.8.1 RC3 on Windows.
>
That should work. Can create a small example that shows this problem?
-Bill
More information about the CMake
mailing list