[CMake] FIND_PATH_VERIFY macro

Bill Hoffman bill.hoffman at kitware.com
Thu Dec 14 08:31:14 EST 2006


Alexander Neundorf wrote:
> Hi,
>
> Von: "Vincent Scheib" <vsglists at gmail.com>
>
>   
>> Here's a handy usability improvement we recently implemented. It may
>> be possible to fold this type of functionality back into FIND_PATH.
>>
>> The use case is this:
>> - CMake is called
>> - FIND_PATH is used to determine the location of a package
>> - FIND_PATH set's a variable, and places it into the cache
>> - The package moves for some reason.
>> - CMake is called (again)
>> - FIND_PATH doesn't re-search, because the cache contains a valid
>> directory value for the variable.
>> - user doesn't notice the error until build.
>>     
> ...
>
> One of our developers had this problem too last week.
> I think if something like this should be done, it should happen directly in find_path() etc. What do the cmake devs think about this ?
>   
Sounds a bit dangerous, as I know that folks sometimes for various 
reasons set stuff to things
that do not exist on purpose.  For what its worth, autoconf would have 
the same problem,
if you move an installed package, you have to remove the cache and re-run.

-Bill



More information about the CMake mailing list