Просмотр исходного кода

Fix find_package for cmake-gui registry entry

The find_package commands looks at the "WhereBuild" registry entries
created by CMakeSetup and cmake-gui hoping that the project was recently
built.  CMakeSetup created WhereBuild1..WhereBuild10 but cmake-gui
creates WhereBuild0-WhereBuild9.

This fixes find_package to look at WhereBuild0 so that the most recently
configured project can be found.  It is important in the case that the
package to be found was the last one configured in cmake-gui but the
current project that is finding it is configured from the command line.
Brad King 16 лет назад
Родитель
Сommit
be24db77d0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Source/cmFindPackageCommand.cxx

+ 1 - 1
Source/cmFindPackageCommand.cxx

@@ -1137,7 +1137,7 @@ void cmFindPackageCommand::AddPrefixesBuilds()
   if(!this->NoBuilds && !this->NoDefaultPath)
     {
     // It is likely that CMake will have recently built the project.
-    for(int i=1; i <= 10; ++i)
+    for(int i=0; i <= 10; ++i)
       {
       cmOStringStream r;
       r <<