On Tuesday 13 March 2012, Brad King wrote: > On Sat, Mar 10, 2012 at 7:35 AM, Alexander Neundorf <neund...@kde.org> wrote: > > There is now a branch find_package_set_FOUND_VariableInConfigFile on > > stage. > > > > It behaves almost as you suggested: the _FOUND variable is only removed > > before the Config file is loaded, if the variable exists and is false. > > > > So if some Config file would test for the previous value of _FOUND, it > > will still get the same result. > > I don't remember anything in the previous discussion that motivated this. > Why not unset it unconditionally? The package config file should not > need to care or adjust its behavior based on whether a stray _FOUND was > set. If it wants to communicate between multiple loads during the same > CMake run then it can store information in other variables that are not > set by find_package. > > Is this just for compatibility?
Yes, it is in order to change the behaviour as little as possible. > Are we aware of any real uses of this? In Config files, I am not aware. In Find-modules, there are cases where people do shortcuts if it was TRUE before already. For cases, where the previous value is ignored in the Config file, nothing changes. For cases, where the previous value is tested using if(Foo_FOUND), still nothing changes. The only case AFAICS where something would change is if a Config file checks using if(DEFINED Foo_FOUND), and Foo_FOUND was defined but FALSE before. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers