diff options
author | Brad King <brad.king@kitware.com> | 2009-10-07 18:37:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-07 18:37:30 (GMT) |
commit | 71910b3fd49b3ab555333e3737ef2f7c5fc43dae (patch) | |
tree | 5b2a84bd1790c0d9fcec9269d898be526c531274 /Source/cmFindPackageCommand.h | |
parent | 1b5a986a427301841fddbf79bfa9016309fe28d4 (diff) | |
download | CMake-71910b3fd49b3ab555333e3737ef2f7c5fc43dae.zip CMake-71910b3fd49b3ab555333e3737ef2f7c5fc43dae.tar.gz CMake-71910b3fd49b3ab555333e3737ef2f7c5fc43dae.tar.bz2 |
Fix find_package() when <pkg>_DIR is wrong
When <pkg>_DIR is set to an incorrect version we search again and store
the result in the variable, even if it is <pkg>_DIR-NOTFOUND.
There was a bug in the case when the new search does not find anything
and the old value came from a cache entry with UNINITALIZED type. The
command used to try to load a package configuration file from the last
place searched, and would leave the old wrong value in the entry. This
commit fixes the behavior to avoid trying to load a missing file and to
set the value to <pkg>_DIR-NOTFOUND as expected.
Diffstat (limited to 'Source/cmFindPackageCommand.h')
-rw-r--r-- | Source/cmFindPackageCommand.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 139ca9b..63f4111 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -73,7 +73,7 @@ private: void AddFindDefinition(const char* var, const char* val); void RestoreFindDefinitions(); bool HandlePackageMode(); - void FindConfig(); + bool FindConfig(); bool FindPrefixedConfig(); bool FindFrameworkConfig(); bool FindAppBundleConfig(); |