[Cmake-commits] [cmake-commits] hoffman committed cmAddCustomCommandCommand.cxx 1.37.2.1 1.37.2.2 cmAddCustomCommandCommand.h 1.33.2.1 1.33.2.2 cmCustomCommand.cxx 1.24.2.1 1.24.2.2 cmCustomCommand.h 1.23.2.1 1.23.2.2 cmFindBase.cxx 1.35.2.3 1.35.2.4 cmFindBase.h 1.13 1.13.2.1 cmFindCommon.cxx 1.1 1.1.2.1 cmFindCommon.h 1.1 1.1.2.1 cmFindLibraryCommand.cxx 1.58 1.58.2.1 cmFindLibraryCommand.h 1.27 1.27.2.1 cmFindPackageCommand.cxx 1.36 1.36.2.1 cmFindPackageCommand.h 1.19 1.19.2.1 cmFindPathCommand.cxx 1.41 1.41.2.1 cmFindPathCommand.h 1.18 1.18.2.1 cmFindProgramCommand.cxx 1.42 1.42.2.1 cmGlobalGenerator.cxx 1.227.2.3 1.227.2.4 cmGlobalGenerator.h 1.107.2.2 1.107.2.3 cmGlobalUnixMakefileGenerator3.cxx 1.126.2.2 1.126.2.3 cmGlobalUnixMakefileGenerator3.h 1.55 1.55.2.1 cmGlobalXCodeGenerator.cxx 1.186.2.2 1.186.2.3 cmMakefile.cxx 1.463.2.4 1.463.2.5 cmMakefileTargetGenerator.cxx 1.93.2.5 1.93.2.6 cmake.cxx 1.375.2.6 1.375.2.7

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jun 13 08:55:20 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv21498/Source

Modified Files:
      Tag: CMake-2-6
	cmAddCustomCommandCommand.cxx cmAddCustomCommandCommand.h 
	cmCustomCommand.cxx cmCustomCommand.h cmFindBase.cxx 
	cmFindBase.h cmFindCommon.cxx cmFindCommon.h 
	cmFindLibraryCommand.cxx cmFindLibraryCommand.h 
	cmFindPackageCommand.cxx cmFindPackageCommand.h 
	cmFindPathCommand.cxx cmFindPathCommand.h 
	cmFindProgramCommand.cxx cmGlobalGenerator.cxx 
	cmGlobalGenerator.h cmGlobalUnixMakefileGenerator3.cxx 
	cmGlobalUnixMakefileGenerator3.h cmGlobalXCodeGenerator.cxx 
	cmMakefile.cxx cmMakefileTargetGenerator.cxx cmake.cxx 
Log Message:
ENH: merge in changes from head


Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.35.2.3
retrieving revision 1.35.2.4
diff -C 2 -d -r1.35.2.3 -r1.35.2.4
*** cmFindBase.cxx	29 May 2008 13:15:29 -0000	1.35.2.3
--- cmFindBase.cxx	13 Jun 2008 12:55:17 -0000	1.35.2.4
***************
*** 31,34 ****
--- 31,35 ----
      "             <VAR>\n"
      "             name | NAMES name1 [name2 ...]\n"
+     "             [HINTS path1 [path2 ... ENV var]]\n"
      "             [PATHS path1 [path2 ... ENV var]]\n"
      "             [PATH_SUFFIXES suffix1 [suffix2 ...]]\n"
***************
*** 56,60 ****
      "after the NAMES argument.   Additional search locations "
      "can be specified after the PATHS argument.  If ENV var is "
!     "found in the PATHS section the environment variable var "
      "will be read and converted from a system environment variable to "
      "a cmake style list of paths.  For example ENV PATH would be a way "
--- 57,61 ----
      "after the NAMES argument.   Additional search locations "
      "can be specified after the PATHS argument.  If ENV var is "
!     "found in the HINTS or PATHS section the environment variable var "
      "will be read and converted from a system environment variable to "
      "a cmake style list of paths.  For example ENV PATH would be a way "
***************
*** 66,89 ****
      "added to the search. "
      "If NO_DEFAULT_PATH is not specified, the search process is as follows:\n"
!     "1. Search cmake specific environment variables.  This "
!     "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
!     ""
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "2. Search cmake variables with the same names as "
!     "the cmake specific environment variables.  These "
!     "are intended to be used on the command line with a "
!     "-DVAR=value.  This can be skipped if NO_CMAKE_PATH "
!     "is passed.\n"
!     ""
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "3. Search the standard system environment variables. "
      "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.\n"
      "   PATH\n"
      "   XXX_SYSTEM\n"  // replace with "", LIB, or INCLUDE
!     "4. Search cmake variables defined in the Platform files "
      "for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH "
      "is passed.\n"
--- 67,91 ----
      "added to the search. "
      "If NO_DEFAULT_PATH is not specified, the search process is as follows:\n"
!     "1. Search paths specified in cmake-specific cache variables.  "
!     "These are intended to be used on the command line with a -DVAR=value.  "
!     "This can be skipped if NO_CMAKE_PATH is passed.\n"
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "2. Search paths specified in cmake-specific environment variables.  "
!     "These are intended to be set in the user's shell configuration.  "
!     "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   <prefix>/XXX_SUBDIR for each <prefix> in CMAKE_PREFIX_PATH\n"
      "   CMAKE_XXX_PATH\n"
      "   CMAKE_XXX_MAC_PATH\n"
!     "3. Search the paths specified by the HINTS option.  "
!     "These should be paths computed by system introspection, such as a "
!     "hint provided by the location of another item already found.  "
!     "Hard-coded guesses should be specified with the PATHS option.\n"
!     "4. Search the standard system environment variables. "
      "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.\n"
      "   PATH\n"
      "   XXX_SYSTEM\n"  // replace with "", LIB, or INCLUDE
!     "5. Search cmake variables defined in the Platform files "
      "for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH "
      "is passed.\n"
***************
*** 91,96 ****
      "   CMAKE_SYSTEM_XXX_PATH\n"
      "   CMAKE_SYSTEM_XXX_MAC_PATH\n"
!     "5. Search the paths specified after PATHS or in the short-hand version "
!     "of the command.\n"
      ;
    this->GenericDocumentation += this->GenericDocumentationMacPolicy;
--- 93,99 ----
      "   CMAKE_SYSTEM_XXX_PATH\n"
      "   CMAKE_SYSTEM_XXX_MAC_PATH\n"
!     "6. Search the paths specified by the PATHS option "
!     "or in the short-hand version of the command.  "
!     "These are typically hard-coded guesses.\n"
      ;
    this->GenericDocumentation += this->GenericDocumentationMacPolicy;
***************
*** 162,224 ****
    this->SelectDefaultMacMode();
  
-   std::vector<std::string> userPaths;
-   std::string doc;
-   bool doingNames = true; // assume it starts with a name
-   bool doingPaths = false;
-   bool doingPathSuf = false;
    bool newStyle = false;
!   
    for (unsigned int j = 1; j < args.size(); ++j)
      {
      if(args[j] == "NAMES")
        {
!       doingNames = true;
        newStyle = true;
-       doingPathSuf = false;
-       doingPaths = false;
        }
      else if (args[j] == "PATHS")
        {
!       doingPaths = true;
        newStyle = true;
-       doingNames = false;
-       doingPathSuf = false;
        }
      else if (args[j] == "PATH_SUFFIXES")
        {
        compatibility = false;
-       doingPathSuf = true;
        newStyle = true;
-       doingNames = false;
-       doingPaths = false;
        }
      else if (args[j] == "NO_SYSTEM_PATH")
        {
!       doingPaths = false;
!       doingPathSuf = false;
!       doingNames = false;
        this->NoDefaultPath = true;
        }
      else if (this->CheckCommonArgument(args[j]))
        {
        compatibility = false;
!       doingPaths = false;
!       doingPathSuf = false;
!       doingNames = false;
        }
!     else
        {
!       if(doingNames)
!         {
!         this->Names.push_back(args[j]);
!         }
!       else if(doingPaths)
!         { 
!         userPaths.push_back(args[j]);
!         }
!       else if(doingPathSuf)
!         {
!         this->AddPathSuffix(args[j]);
!         }
        }
      }
--- 165,223 ----
    this->SelectDefaultMacMode();
  
    bool newStyle = false;
!   enum Doing { DoingNone, DoingNames, DoingPaths, DoingPathSuffixes,
!                DoingHints };
!   Doing doing = DoingNames; // assume it starts with a name
    for (unsigned int j = 1; j < args.size(); ++j)
      {
      if(args[j] == "NAMES")
        {
!       doing = DoingNames;
        newStyle = true;
        }
      else if (args[j] == "PATHS")
        {
!       doing = DoingPaths;
!       newStyle = true;
!       }
!     else if (args[j] == "HINTS")
!       {
!       doing = DoingHints;
        newStyle = true;
        }
      else if (args[j] == "PATH_SUFFIXES")
        {
+       doing = DoingPathSuffixes;
        compatibility = false;
        newStyle = true;
        }
      else if (args[j] == "NO_SYSTEM_PATH")
        {
!       doing = DoingNone;
        this->NoDefaultPath = true;
        }
      else if (this->CheckCommonArgument(args[j]))
        {
+       doing = DoingNone;
        compatibility = false;
!       // Some common arguments were accidentally supported by CMake
!       // 2.4 and 2.6.0 in the short-hand form of the command, so we
!       // must support it even though it is not documented.
        }
!     else if(doing == DoingNames)
        {
!       this->Names.push_back(args[j]);
!       }
!     else if(doing == DoingPaths)
!       {
!       this->AddUserPath(args[j], this->UserPaths);
!       }
!     else if(doing == DoingHints)
!       {
!       this->AddUserPath(args[j], this->UserHints);
!       }
!     else if(doing == DoingPathSuffixes)
!       {
!       this->AddPathSuffix(args[j]);
        }
      }
***************
*** 263,356 ****
    if(!newStyle)
      {
      this->Names.clear(); // clear out any values in Names
!     this->Names.push_back(args[1]);
!     for(unsigned int j = 2; j < args.size(); ++j)
        {
!       userPaths.push_back(args[j]);
        }
      }
!   this->ExpandPaths(userPaths);
  
    // Handle search root stuff.
    this->RerootPaths(this->SearchPaths);
    return true;
  }
  
! void cmFindBase::ExpandPaths(std::vector<std::string> userPaths)
  {
!   // if NO Default paths was not specified add the
!   // standard search paths.
!   if(!this->NoDefaultPath)
!     {
!     if(this->SearchFrameworkFirst || this->SearchFrameworkOnly)
!       {
!       this->AddFrameWorkPaths();
!       }
!     if(this->SearchAppBundleFirst || this->SearchAppBundleOnly)
!       {
!       this->AddAppBundlePaths();
!       }
!     if(!this->NoCMakeEnvironmentPath && 
!        !(this->SearchFrameworkOnly || this->SearchAppBundleOnly))
!       {
!       // Add CMAKE_*_PATH environment variables
!       this->AddEnvironmentVariables();
!       }
!     if(!this->NoCMakePath && 
!        !(this->SearchFrameworkOnly || this->SearchAppBundleOnly))
!       {
!       // Add CMake varibles of the same name as the previous environment
!       // varibles CMAKE_*_PATH to be used most of the time with -D
!       // command line options
!       this->AddCMakeVariables();
!       }
!     if(!this->NoSystemEnvironmentPath && 
!        !(this->SearchFrameworkOnly || this->SearchAppBundleOnly))
!       {
!       // add System environment PATH and (LIB or INCLUDE)
!       this->AddSystemEnvironmentVariables();
!       }
!     if(!this->NoCMakeSystemPath && 
!        !(this->SearchFrameworkOnly || this->SearchAppBundleOnly))
!       {
!       // Add CMAKE_SYSTEM_*_PATH variables which are defined in platform files
!       this->AddCMakeSystemVariables();
!       }
!     if(this->SearchAppBundleLast)
!       {
!       this->AddAppBundlePaths();
!       }
!     if(this->SearchFrameworkLast)
!       {
!       this->AddFrameWorkPaths();
!       }
!     }
!   std::vector<std::string> paths;
!   // add the paths specified in the FIND_* call 
!   for(unsigned int i =0; i < userPaths.size(); ++i)
!     {
!     paths.push_back(userPaths[i]);
!     }
!   this->AddPaths(paths);
! }
! 
! //----------------------------------------------------------------------------
! void cmFindBase::AddEnvironmentVariables()
! { 
!   std::vector<std::string> paths;
! 
!   std::vector<std::string> prefixPaths;
!   cmSystemTools::GetPath(prefixPaths, "CMAKE_PREFIX_PATH");
!   this->AddFindPrefix(paths, prefixPaths);
  
!   std::string var = "CMAKE_";
!   var += this->CMakePathName;
!   var += "_PATH";
!   cmSystemTools::GetPath(paths, var.c_str());
!   this->AddPaths(paths);
  }
  
! void cmFindBase::AddFindPrefix(std::vector<std::string>& dest, 
!                                const std::vector<std::string>& src)
  {
    // default for programs
--- 262,301 ----
    if(!newStyle)
      {
+     // All the short-hand arguments have been recorded as names.
+     std::vector<std::string> shortArgs = this->Names;
      this->Names.clear(); // clear out any values in Names
!     this->Names.push_back(shortArgs[0]);
!     for(unsigned int j = 1; j < shortArgs.size(); ++j)
        {
!       this->AddUserPath(shortArgs[j], this->UserPaths);
        }
      }
!   this->ExpandPaths();
  
    // Handle search root stuff.
    this->RerootPaths(this->SearchPaths);
+ 
+   // Add a trailing slash to all prefixes to aid the search process.
+   this->AddTrailingSlashes(this->SearchPaths);
+ 
    return true;
  }
  
! void cmFindBase::ExpandPaths()
  {
!   this->AddCMakeVariablePath();
!   this->AddCMakeEnvironmentPath();
!   this->AddUserHintsPath();
!   this->AddSystemEnvironmentPath();
!   this->AddCMakeSystemVariablePath();
!   this->AddUserGuessPath();
  
!   // Add suffixes and clean up paths.
!   this->AddPathSuffixes();
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddPrefixPaths(std::vector<std::string> const& in_paths,
!                                 PathType pathType)
  {
    // default for programs
***************
*** 370,376 ****
      }
  
!   for (std::vector<std::string>::const_iterator it = src.begin();
!        it != src.end();
!        ++it)
      {
      std::string dir = it->c_str();
--- 315,320 ----
      }
  
!   for(std::vector<std::string>::const_iterator it = in_paths.begin();
!       it != in_paths.end(); ++it)
      {
      std::string dir = it->c_str();
***************
*** 382,520 ****
      if(add != "/")
        {
!       dest.push_back(add);
        }
      if (subdir == "bin")
        {
!       dest.push_back(dir + "sbin");
        }
      if(!subdir.empty() && *it != "/")
        {
!       dest.push_back(*it);
        }
      }
  }
  
! void cmFindBase::AddFrameWorkPaths()
  {
!   std::vector<std::string> paths;
!   this->GetFrameworkPaths(paths);
!   this->AddPaths(paths);
  }
  
! void cmFindBase::AddPaths(std::vector<std::string> & paths)
  {
!   // add suffixes and clean up paths
!   this->ExpandRegistryAndCleanPath(paths);
!   // add the paths to the search paths
!   this->SearchPaths.insert(this->SearchPaths.end(),
!                            paths.begin(),
!                            paths.end());
  }
  
! void cmFindBase::AddAppBundlePaths()
  {
!   std::vector<std::string> paths;
!   this->GetAppBundlePaths(paths);
!   this->AddPaths(paths);
! }
! 
! void cmFindBase::AddCMakeVariables()
! { 
!   std::string var = "CMAKE_";
!   var += this->CMakePathName;
!   var += "_PATH";
!   std::vector<std::string> paths;
! 
!   if(const char* prefixPath = 
!       this->Makefile->GetDefinition("CMAKE_PREFIX_PATH"))
      {
!     std::vector<std::string> prefixPaths;
!     cmSystemTools::ExpandListArgument(prefixPath, prefixPaths);
!     this->AddFindPrefix(paths, prefixPaths);
!     }
  
!   if(const char* path = this->Makefile->GetDefinition(var.c_str()))
!     {
!     cmSystemTools::ExpandListArgument(path, paths);
!     } 
!   this->AddPaths(paths);
  }
  
! void cmFindBase::AddSystemEnvironmentVariables()
  {
!   // Add LIB or INCLUDE
!   std::vector<std::string> paths;
!   if(this->EnvironmentPath.size())
      {
!     cmSystemTools::GetPath(paths, this->EnvironmentPath.c_str());
      }
-   // Add PATH 
-   cmSystemTools::GetPath(paths);
-   this->AddPaths(paths);
  }
  
! void cmFindBase::AddCMakeSystemVariables()
! {  
!   std::string var = "CMAKE_SYSTEM_";
!   var += this->CMakePathName;
!   var += "_PATH";
!   std::vector<std::string> paths;
!   if(const char* prefixPath =
!       this->Makefile->GetDefinition("CMAKE_SYSTEM_PREFIX_PATH"))
      {
!     std::vector<std::string> prefixPaths;
!     cmSystemTools::ExpandListArgument(prefixPath, prefixPaths);
!     this->AddFindPrefix(paths, prefixPaths);
      }
-   if(const char* path = this->Makefile->GetDefinition(var.c_str()))
-     {
-     cmSystemTools::ExpandListArgument(path, paths);
-     }  
-   this->AddPaths(paths);
  }
  
! void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths)
  {
!   // We should view the registry as the target application would view
!   // it.
!   cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_Default;
!   cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_Default;
!   {
!   if(const char* psize =
!      this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
      {
!     switch(atoi(psize))
        {
!       case 4:
!         view = cmSystemTools::KeyWOW64_32;
!         other_view = cmSystemTools::KeyWOW64_64;
!         break;
!       case 8:
!         view = cmSystemTools::KeyWOW64_64;
!         other_view = cmSystemTools::KeyWOW64_32;
!         break;
!       default: break;
        }
!     }
!   }
!   std::vector<std::string> finalPath;
!   std::vector<std::string>::iterator i;
!   // glob and expand registry stuff from paths and put
!   // into finalPath
!   for(i = paths.begin();
!       i != paths.end(); ++i)
!     {
!     std::string expanded = *i;
!     cmSystemTools::ExpandRegistryValues(expanded, view);
!     cmSystemTools::GlobDirs(expanded.c_str(), finalPath);
!     if(view != other_view && expanded != *i &&
!        this->CMakePathName == "PROGRAM")
        {
!       // Executables can be either 32-bit or 64-bit.
!       expanded = *i;
!       cmSystemTools::ExpandRegistryValues(expanded, other_view);
!       cmSystemTools::GlobDirs(expanded.c_str(), finalPath);
        }
      }
    // clear the path
    paths.clear();
--- 326,466 ----
      if(add != "/")
        {
!       this->AddPathInternal(add, pathType);
        }
      if (subdir == "bin")
        {
!       this->AddPathInternal(dir+"sbin", pathType);
        }
      if(!subdir.empty() && *it != "/")
        {
!       this->AddPathInternal(*it, pathType);
        }
      }
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddCMakePrefixPath(const char* variable)
  {
!   // Get a path from a CMake variable.
!   if(const char* varPath = this->Makefile->GetDefinition(variable))
!     {
!     std::vector<std::string> tmp;
!     cmSystemTools::ExpandListArgument(varPath, tmp);
!     this->AddPrefixPaths(tmp, CMakePath);
!     }
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddEnvPrefixPath(const char* variable)
  {
!   // Get a path from the environment.
!   std::vector<std::string> tmp;
!   cmSystemTools::GetPath(tmp, variable);
!   this->AddPrefixPaths(tmp, EnvPath);
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddCMakeEnvironmentPath()
  {
!   if(!this->NoCMakeEnvironmentPath && !this->NoDefaultPath)
      {
!     // Add CMAKE_*_PATH environment variables
!     std::string var = "CMAKE_";
!     var += this->CMakePathName;
!     var += "_PATH";
!     this->AddEnvPrefixPath("CMAKE_PREFIX_PATH");
!     this->AddEnvPath(var.c_str());
  
!     if(this->CMakePathName == "PROGRAM")
!       {
!       this->AddEnvPath("CMAKE_APPBUNDLE_PATH");
!       }
!     else
!       {
!       this->AddEnvPath("CMAKE_FRAMEWORK_PATH");
!       }
!     }
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddCMakeVariablePath()
  {
!   if(!this->NoCMakePath && !this->NoDefaultPath)
      {
!     // Add CMake varibles of the same name as the previous environment
!     // varibles CMAKE_*_PATH to be used most of the time with -D
!     // command line options
!     std::string var = "CMAKE_";
!     var += this->CMakePathName;
!     var += "_PATH";
!     this->AddCMakePrefixPath("CMAKE_PREFIX_PATH");
!     this->AddCMakePath(var.c_str());
! 
!     if(this->CMakePathName == "PROGRAM")
!       {
!       this->AddCMakePath("CMAKE_APPBUNDLE_PATH");
!       }
!     else
!       {
!       this->AddCMakePath("CMAKE_FRAMEWORK_PATH");
!       }
      }
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddSystemEnvironmentPath()
! {
!   if(!this->NoSystemEnvironmentPath && !this->NoDefaultPath)
      {
!     // Add LIB or INCLUDE
!     if(!this->EnvironmentPath.empty())
!       {
!       this->AddEnvPath(this->EnvironmentPath.c_str());
!       }
!     // Add PATH
!     this->AddEnvPath(0);
      }
  }
  
! //----------------------------------------------------------------------------
! void cmFindBase::AddCMakeSystemVariablePath()
  {
!   if(!this->NoCMakeSystemPath && !this->NoDefaultPath)
      {
!     std::string var = "CMAKE_SYSTEM_";
!     var += this->CMakePathName;
!     var += "_PATH";
!     this->AddCMakePrefixPath("CMAKE_SYSTEM_PREFIX_PATH");
!     this->AddCMakePath(var.c_str());
! 
!     if(this->CMakePathName == "PROGRAM")
        {
!       this->AddCMakePath("CMAKE_SYSTEM_APPBUNDLE_PATH");
        }
!     else
        {
!       this->AddCMakePath("CMAKE_SYSTEM_FRAMEWORK_PATH");
        }
      }
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmFindBase::AddUserHintsPath()
+ {
+   this->AddPathsInternal(this->UserHints, CMakePath);
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmFindBase::AddUserGuessPath()
+ {
+   this->AddPathsInternal(this->UserPaths, CMakePath);
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmFindBase::AddPathSuffixes()
+ {
+   std::vector<std::string>& paths = this->SearchPaths;
+   std::vector<std::string> finalPath = paths;
+   std::vector<std::string>::iterator i;
    // clear the path
    paths.clear();

Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.93.2.5
retrieving revision 1.93.2.6
diff -C 2 -d -r1.93.2.5 -r1.93.2.6
*** cmMakefileTargetGenerator.cxx	23 May 2008 20:09:38 -0000	1.93.2.5
--- cmMakefileTargetGenerator.cxx	13 Jun 2008 12:55:17 -0000	1.93.2.6
***************
*** 1117,1120 ****
--- 1117,1124 ----
                     cmLocalUnixMakefileGenerator3::EchoGenerate);
      }
+   // Below we need to skip over the echo and progress commands.
+   unsigned int skip = static_cast<unsigned int>(commands.size());
+ 
+   // Now append the actual user-specified commands.
    this->LocalGenerator->AppendCustomCommand(commands, cc);
  
***************
*** 1123,1133 ****
    this->LocalGenerator->AppendCustomDepend(depends, cc);
  
-   // Add a dependency on the rule file itself.
-   if(!cc.GetSkipRuleDepends())
-     {
-     this->LocalGenerator->AppendRuleDepend(depends,
-                                            this->BuildFileNameFull.c_str());
-     }
- 
    // Check whether we need to bother checking for a symbolic output.
    bool need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark();
--- 1127,1130 ----
***************
*** 1148,1151 ****
--- 1145,1156 ----
                                        o->c_str(), depends, commands,
                                        symbolic);
+ 
+   // If the rule has changed make sure the output is rebuilt.
+   if(!symbolic)
+     {
+     this->GlobalGenerator->AddRuleHash(cc.GetOutputs(),
+                                        commands.begin()+skip,
+                                        commands.end());
+     }
    }
  

Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.107.2.2
retrieving revision 1.107.2.3
diff -C 2 -d -r1.107.2.2 -r1.107.2.3
*** cmGlobalGenerator.h	29 May 2008 13:15:30 -0000	1.107.2.2
--- cmGlobalGenerator.h	13 Jun 2008 12:55:17 -0000	1.107.2.3
***************
*** 246,249 ****
--- 246,253 ----
    void GetFilesReplacedDuringGenerate(std::vector<std::string>& filenames);
  
+   void AddRuleHash(const std::vector<std::string>& outputs,
+                    std::vector<std::string>::const_iterator first,
+                    std::vector<std::string>::const_iterator last);
+ 
  protected:
    // for a project collect all its targets by following depend
***************
*** 314,317 ****
--- 318,326 ----
    std::map<cmStdString,cmTarget *> TotalTargets;
  
+   // Record hashes for rules and outputs.
+   struct RuleHash { char Data[32]; };
+   std::map<cmStdString, RuleHash> RuleHashes;
+   void CheckRuleHashes();
+ 
    cmExternalMakefileProjectGenerator* ExtraGenerator;
  

Index: cmGlobalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v
retrieving revision 1.126.2.2
retrieving revision 1.126.2.3
diff -C 2 -d -r1.126.2.2 -r1.126.2.3
*** cmGlobalUnixMakefileGenerator3.cxx	15 May 2008 19:39:54 -0000	1.126.2.2
--- cmGlobalUnixMakefileGenerator3.cxx	13 Jun 2008 12:55:17 -0000	1.126.2.3
***************
*** 772,776 ****
                                cmLocalGenerator::SHELL);
        //
!       std::set<cmStdString> emitted;
        progCmd << " " 
                << this->GetTargetTotalNumberOfActions(t->second,
--- 772,776 ----
                                cmLocalGenerator::SHELL);
        //
!       std::set<cmTarget *> emitted;
        progCmd << " " 
                << this->GetTargetTotalNumberOfActions(t->second,
***************
*** 849,859 ****
  //----------------------------------------------------------------------------
  int cmGlobalUnixMakefileGenerator3
! ::GetTargetTotalNumberOfActions(cmTarget & target,
!                                 std::set<cmStdString> &emitted)
  {
    // do not double count
    int result = 0;
  
!   if(emitted.insert(target.GetName()).second)
      {
      cmLocalUnixMakefileGenerator3 *lg = 
--- 849,859 ----
  //----------------------------------------------------------------------------
  int cmGlobalUnixMakefileGenerator3
! ::GetTargetTotalNumberOfActions(cmTarget &target,
!                                 std::set<cmTarget *> &emitted)
  {
    // do not double count
    int result = 0;
  
!   if(emitted.insert(&target).second)
      {
      cmLocalUnixMakefileGenerator3 *lg = 
***************
*** 878,882 ****
  {
    unsigned long result = 0;
!   std::set<cmStdString> emitted;
    std::set<cmTarget *>& targets = this->LocalGeneratorToTargetMap[lg];
    for(std::set<cmTarget *>::iterator t = targets.begin();
--- 878,882 ----
  {
    unsigned long result = 0;
!   std::set<cmTarget *> emitted;
    std::set<cmTarget *>& targets = this->LocalGeneratorToTargetMap[lg];
    for(std::set<cmTarget *>::iterator t = targets.begin();
***************
*** 957,970 ****
            }
          }
-       std::vector<cmStdString> const& localHelp = lg->GetLocalHelp();
-       for(std::vector<cmStdString>::const_iterator o = localHelp.begin();
-           o != localHelp.end(); ++o)
-         {
-         path = "... ";
-         path += *o;
-         lg->AppendEcho(commands, path.c_str());
-         }
        }
      }
    lg->WriteMakeRule(ruleFileStream, "Help Target",
                      "help",
--- 957,970 ----
            }
          }
        }
      }
+   std::vector<cmStdString> const& localHelp = lg->GetLocalHelp();
+   for(std::vector<cmStdString>::const_iterator o = localHelp.begin();
+       o != localHelp.end(); ++o)
+     {
+     path = "... ";
+     path += *o;
+     lg->AppendEcho(commands, path.c_str());
+     }
    lg->WriteMakeRule(ruleFileStream, "Help Target",
                      "help",

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227.2.3
retrieving revision 1.227.2.4
diff -C 2 -d -r1.227.2.3 -r1.227.2.4
*** cmGlobalGenerator.cxx	29 May 2008 13:15:29 -0000	1.227.2.3
--- cmGlobalGenerator.cxx	13 Jun 2008 12:55:17 -0000	1.227.2.4
***************
*** 28,34 ****
--- 28,39 ----
  #include "cmExportInstallFileGenerator.h"
  #include "cmComputeTargetDepends.h"
+ #include "cmGeneratedFileStream.h"
  
  #include <cmsys/Directory.hxx>
  
+ #if defined(CMAKE_BUILD_WITH_CMAKE)
+ # include <cmsys/MD5.h>
+ #endif
+ 
  #include <stdlib.h> // required for atof
  
***************
*** 406,415 ****
        fpath +=  lang;
        fpath += "Information.cmake";
!       fpath = mf->GetModulesFile(fpath.c_str());
!       if(!mf->ReadListFile(0,fpath.c_str()))
          {
          cmSystemTools::Error("Could not find cmake module file:",
                               fpath.c_str());
          }
        }
      if (needSetLanguageEnabledMaps[lang])
--- 411,425 ----
        fpath +=  lang;
        fpath += "Information.cmake";
!       std::string informationFile = mf->GetModulesFile(fpath.c_str());
!       if (informationFile.empty())
          {
          cmSystemTools::Error("Could not find cmake module file:",
                               fpath.c_str());
          }
+       else if(!mf->ReadListFile(0, informationFile.c_str()))
+         {
+         cmSystemTools::Error("Could not process cmake module file:",
+                              informationFile.c_str());
+         }
        }
      if (needSetLanguageEnabledMaps[lang])
***************
*** 418,426 ****
        }
  
      // Test the compiler for the language just setup
      // At this point we should have enough info for a try compile
      // which is used in the backward stuff
      // If the language is untested then test it now with a try compile.
!     if(needTestLanguage[lang])
        {
        if (!this->CMakeInstance->GetIsInTryCompile())
--- 428,451 ----
        }
  
+     std::string compilerName = "CMAKE_";
+     compilerName += lang;
+     compilerName += "_COMPILER";
+     std::string compilerLangFile = rootBin;
+     compilerLangFile += "/CMake";
+     compilerLangFile += lang;
+     compilerLangFile += "Compiler.cmake";
      // Test the compiler for the language just setup
+     // (but only if a compiler has been actually found)
      // At this point we should have enough info for a try compile
      // which is used in the backward stuff
      // If the language is untested then test it now with a try compile.
!     if (!mf->IsSet(compilerName.c_str()))
!       {
!       // if the compiler did not work, then remove the
!       // CMake(LANG)Compiler.cmake file so that it will get tested the
!       // next time cmake is run
!       cmSystemTools::RemoveFile(compilerLangFile.c_str());
!       }
!     else if(needTestLanguage[lang])
        {
        if (!this->CMakeInstance->GetIsInTryCompile())
***************
*** 443,451 ****
          if(!mf->IsOn(compilerWorks.c_str()))
            {
!           fpath = rootBin;
!           fpath += "/CMake";
!           fpath += lang;
!           fpath += "Compiler.cmake";
!           cmSystemTools::RemoveFile(fpath.c_str());
            }
          else
--- 468,472 ----
          if(!mf->IsOn(compilerWorks.c_str()))
            {
!           cmSystemTools::RemoveFile(compilerLangFile.c_str());
            }
          else
***************
*** 687,690 ****
--- 708,712 ----
    this->LocalGeneratorToTargetMap.clear();
    this->ProjectMap.clear();
+   this->RuleHashes.clear();
  
    // start with this directory
***************
*** 841,844 ****
--- 863,869 ----
    this->SetCurrentLocalGenerator(0);
  
+   // Update rule hashes.
+   this->CheckRuleHashes();
+ 
    if (this->ExtraGenerator != 0)
      {
***************
*** 1932,1933 ****
--- 1957,2083 ----
  }
  
+ //----------------------------------------------------------------------------
+ void
+ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
+                                std::vector<std::string>::const_iterator first,
+                                std::vector<std::string>::const_iterator last)
+ {
+ #if defined(CMAKE_BUILD_WITH_CMAKE)
+   // Ignore if there are no outputs.
+   if(outputs.empty())
+     {
+     return;
+     }
+ 
+   // Compute a hash of the rule.
+   RuleHash hash;
+   {
+   unsigned char const* data;
+   int length;
+   cmsysMD5* sum = cmsysMD5_New();
+   cmsysMD5_Initialize(sum);
+   for(std::vector<std::string>::const_iterator i = first; i != last; ++i)
+     {
+     data = reinterpret_cast<unsigned char const*>(i->c_str());
+     length = static_cast<int>(i->length());
+     cmsysMD5_Append(sum, data, length);
+     }
+   cmsysMD5_FinalizeHex(sum, hash.Data);
+   cmsysMD5_Delete(sum);
+   }
+ 
+   // Shorten the output name (in expected use case).
+   cmLocalGenerator* lg = this->GetLocalGenerators()[0];
+   std::string fname = lg->Convert(outputs[0].c_str(),
+                                   cmLocalGenerator::HOME_OUTPUT);
+ 
+   // Associate the hash with this output.
+   this->RuleHashes[fname] = hash;
+ #else
+   (void)outputs;
+   (void)first;
+   (void)last;
+ #endif
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmGlobalGenerator::CheckRuleHashes()
+ {
+ #if defined(CMAKE_BUILD_WITH_CMAKE)
+   std::string home = this->GetCMakeInstance()->GetHomeOutputDirectory();
+   std::string pfile = home;
+   pfile += this->GetCMakeInstance()->GetCMakeFilesDirectory();
+   pfile += "/CMakeRuleHashes.txt";
+ 
+ #if defined(_WIN32) || defined(__CYGWIN__)
+   std::ifstream fin(pfile.c_str(), std::ios::in | std::ios::binary);
+ #else
+   std::ifstream fin(pfile.c_str(), std::ios::in);
+ #endif
+   std::string line;
+   std::string fname;
+   while(cmSystemTools::GetLineFromStream(fin, line))
+     {
+     // Line format is a 32-byte hex string followed by a space
+     // followed by a file name (with no escaping).
+ 
+     // Skip blank and comment lines.
+     if(line.size() < 34 || line[0] == '#')
+       {
+       continue;
+       }
+ 
+     // Get the filename.
+     fname = line.substr(33, line.npos);
+ 
+     // Look for a hash for this file's rule.
+     std::map<cmStdString, RuleHash>::const_iterator rhi =
+       this->RuleHashes.find(fname);
+     if(rhi != this->RuleHashes.end())
+       {
+       // Compare the rule hash in the file to that we were given.
+       if(strncmp(line.c_str(), rhi->second.Data, 32) != 0)
+         {
+         // The rule has changed.  Delete the output so it will be
+         // built again.
+         fname = cmSystemTools::CollapseFullPath(fname.c_str(), home.c_str());
+         cmSystemTools::RemoveFile(fname.c_str());
+         }
+       }
+     else
+       {
+       // We have no hash for a rule previously listed.  This may be a
+       // case where a user has turned off a build option and might
+       // want to turn it back on later, so do not delete the file.
+       // Instead, we keep the rule hash as long as the file exists so
+       // that if the feature is turned back on and the rule has
+       // changed the file is still rebuilt.
+       std::string fpath =
+         cmSystemTools::CollapseFullPath(fname.c_str(), home.c_str());
+       if(cmSystemTools::FileExists(fpath.c_str()))
+         {
+         RuleHash hash;
+         strncpy(hash.Data, line.c_str(), 32);
+         this->RuleHashes[fname] = hash;
+         }
+       }
+     }
+ 
+   // Now generate a new persistence file with the current hashes.
+   if(this->RuleHashes.empty())
+     {
+     cmSystemTools::RemoveFile(pfile.c_str());
+     }
+   else
+     {
+     cmGeneratedFileStream fout(pfile.c_str());
+     fout << "# Hashes of file build rules.\n";
+     for(std::map<cmStdString, RuleHash>::const_iterator
+           rhi = this->RuleHashes.begin(); rhi != this->RuleHashes.end(); ++rhi)
+       {
+       fout.write(rhi->second.Data, 32);
+       fout << " " << rhi->first << "\n";
+       }
+     }
+ #endif
+ }

Index: cmFindCommon.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindCommon.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** cmFindCommon.h	17 Jan 2008 14:02:31 -0000	1.1
--- cmFindCommon.h	13 Jun 2008 12:55:17 -0000	1.1.2.1
***************
*** 45,48 ****
--- 45,51 ----
    void RerootPaths(std::vector<std::string>& paths);
  
+   /** Add trailing slashes to all search paths.  */
+   void AddTrailingSlashes(std::vector<std::string>& paths);
+ 
    /** Compute the current default root path mode.  */
    void SelectDefaultRootPathMode();
***************
*** 56,74 ****
    bool CheckCommonArgument(std::string const& arg);
    void AddPathSuffix(std::string const& arg);
!   void GetAppBundlePaths(std::vector<std::string>& paths);
!   void GetFrameworkPaths(std::vector<std::string>& paths);
! 
!   void AddCMakePath(std::vector<std::string>& out_paths,
!                     const char* variable, std::set<cmStdString>* emmitted = 0);
!   void AddEnvPath(std::vector<std::string>& out_paths,
!                   const char* variable, std::set<cmStdString>* emmitted = 0);
!   void AddPathsInternal(std::vector<std::string>& out_paths,
!                         std::vector<std::string> const& in_paths,
!                         PathType pathType,
!                         std::set<cmStdString>* emmitted = 0);
!   void AddPathInternal(std::vector<std::string>& out_paths,
!                        std::string const& in_path,
!                        PathType pathType,
!                        std::set<cmStdString>* emmitted = 0);
  
    bool NoDefaultPath;
--- 59,69 ----
    bool CheckCommonArgument(std::string const& arg);
    void AddPathSuffix(std::string const& arg);
!   void AddUserPath(std::string const& p,
!                    std::vector<std::string>& paths);
!   void AddCMakePath(const char* variable);
!   void AddEnvPath(const char* variable);
!   void AddPathsInternal(std::vector<std::string> const& in_paths,
!                         PathType pathType);
!   void AddPathInternal(std::string const& in_path, PathType pathType);
  
    bool NoDefaultPath;
***************
*** 79,82 ****
--- 74,81 ----
  
    std::vector<std::string> SearchPathSuffixes;
+   std::vector<std::string> UserPaths;
+   std::vector<std::string> UserHints;
+   std::vector<std::string> SearchPaths;
+   std::set<cmStdString> SearchPathsEmitted;
  
    std::string GenericDocumentationMacPolicy;

Index: cmCustomCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCustomCommand.cxx,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -C 2 -d -r1.24.2.1 -r1.24.2.2
*** cmCustomCommand.cxx	15 May 2008 19:39:50 -0000	1.24.2.1
--- cmCustomCommand.cxx	13 Jun 2008 12:55:17 -0000	1.24.2.2
***************
*** 23,27 ****
    this->EscapeOldStyle = true;
    this->EscapeAllowMakeVars = false;
-   this->SkipRuleDepends = false;
  }
  
--- 23,26 ----
***************
*** 52,58 ****
    WorkingDirectory(workingDirectory?workingDirectory:""),
    EscapeAllowMakeVars(false),
!   EscapeOldStyle(true),
!   SkipRuleDepends(false)
  {
  }
  
--- 51,58 ----
    WorkingDirectory(workingDirectory?workingDirectory:""),
    EscapeAllowMakeVars(false),
!   EscapeOldStyle(true)
  {
+   this->EscapeOldStyle = true;
+   this->EscapeAllowMakeVars = false;
  }
  
***************
*** 137,152 ****
  
  //----------------------------------------------------------------------------
- bool cmCustomCommand::GetSkipRuleDepends() const
- {
-   return this->SkipRuleDepends;
- }
- 
- //----------------------------------------------------------------------------
- void cmCustomCommand::SetSkipRuleDepends(bool b)
- {
-   this->SkipRuleDepends = b;
- }
- 
- //----------------------------------------------------------------------------
  cmCustomCommand::ImplicitDependsList const&
  cmCustomCommand::GetImplicitDepends() const
--- 137,140 ----

Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.186.2.2
retrieving revision 1.186.2.3
diff -C 2 -d -r1.186.2.2 -r1.186.2.3
*** cmGlobalXCodeGenerator.cxx	1 May 2008 16:35:39 -0000	1.186.2.2
--- cmGlobalXCodeGenerator.cxx	13 Jun 2008 12:55:17 -0000	1.186.2.3
***************
*** 998,1002 ****
    std::string retFlag;
    std::string::size_type pos = flags.find(flag);
!   if(pos != flags.npos)
      {
      while(pos < flags.size() && flags[pos] != ' ')
--- 998,1002 ----
    std::string retFlag;
    std::string::size_type pos = flags.find(flag);
!   if(pos != flags.npos && (pos ==0 || flags[pos]==' '))
      {
      while(pos < flags.size() && flags[pos] != ' ')

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.6
retrieving revision 1.375.2.7
diff -C 2 -d -r1.375.2.6 -r1.375.2.7
*** cmake.cxx	15 May 2008 19:39:57 -0000	1.375.2.6
--- cmake.cxx	13 Jun 2008 12:55:17 -0000	1.375.2.7
***************
*** 3741,3745 ****
      // just print to stdout here because this code is only reachable
      // through an undocumented flag used by the VS generator.
!     std::cout << "CMake is re-running due to explicit user request.\n";
      return false;
      }
--- 3741,3745 ----
      // just print to stdout here because this code is only reachable
      // through an undocumented flag used by the VS generator.
!     std::cout << "CMake is re-running because build system is out-of-date.\n";
      return false;
      }
***************
*** 3761,3764 ****
--- 3761,3766 ----
      // The stamp dependencies file cannot be read.  Just assume the
      // build system is really out of date.
+     std::cout << "CMake is re-running because " << stampName
+               << " dependency file is missing.\n";
      return false;
      }
***************
*** 3776,3779 ****
--- 3778,3783 ----
        // The stamp depends file is older than this dependency.  The
        // build system is really out of date.
+       std::cout << "CMake is re-running because " << stampName
+                 << " is out-of-date.\n";
        return false;
        }

Index: cmCustomCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCustomCommand.h,v
retrieving revision 1.23.2.1
retrieving revision 1.23.2.2
diff -C 2 -d -r1.23.2.1 -r1.23.2.2
*** cmCustomCommand.h	15 May 2008 19:39:50 -0000	1.23.2.1
--- cmCustomCommand.h	13 Jun 2008 12:55:17 -0000	1.23.2.2
***************
*** 69,76 ****
    void SetEscapeAllowMakeVars(bool b);
  
-   /** Set/Get whether to skip the dependency on the rule itself.  */
-   bool GetSkipRuleDepends() const;
-   void SetSkipRuleDepends(bool b);
- 
    typedef std::pair<cmStdString, cmStdString> ImplicitDependsPair;
    class ImplicitDependsList: public std::vector<ImplicitDependsPair> {};
--- 69,72 ----
***************
*** 88,92 ****
    bool EscapeAllowMakeVars;
    bool EscapeOldStyle;
-   bool SkipRuleDepends;
    ImplicitDependsList ImplicitDepends;
  };
--- 84,87 ----

Index: cmFindPackageCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.h,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -C 2 -d -r1.19 -r1.19.2.1
*** cmFindPackageCommand.h	29 Jan 2008 01:38:48 -0000	1.19
--- cmFindPackageCommand.h	13 Jun 2008 12:55:17 -0000	1.19.2.1
***************
*** 83,88 ****
    void StoreVersionFound();
  
-   void AddUserPath(std::string const& p);
    void ComputePrefixes();
    bool SearchDirectory(std::string const& dir);
    bool CheckDirectory(std::string const& dir);
--- 83,95 ----
    void StoreVersionFound();
  
    void ComputePrefixes();
+   void AddPrefixesCMakeEnvironment();
+   void AddPrefixesCMakeVariable();
+   void AddPrefixesSystemEnvironment();
+   void AddPrefixesBuilds();
+   void AddPrefixesCMakeSystemVariable();
+   void AddPrefixesUserGuess();
+   void AddPrefixesUserHints();
+   void ComputeFinalPrefixes();
    bool SearchDirectory(std::string const& dir);
    bool CheckDirectory(std::string const& dir);
***************
*** 120,125 ****
    std::vector<std::string> Names;
    std::vector<std::string> Configs;
-   std::vector<std::string> Prefixes;
-   std::vector<std::string> UserPaths;
  };
  
--- 127,130 ----

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.463.2.4
retrieving revision 1.463.2.5
diff -C 2 -d -r1.463.2.4 -r1.463.2.5
*** cmMakefile.cxx	15 May 2008 19:39:55 -0000	1.463.2.4
--- cmMakefile.cxx	13 Jun 2008 12:55:17 -0000	1.463.2.5
***************
*** 488,498 ****
        this->cmCurrentListFile = filename;
        }
!     // loop over current function blockers and record them
!     std::list<cmFunctionBlocker *>::iterator pos;
!     for (pos = this->FunctionBlockers.begin();
!          pos != this->FunctionBlockers.end(); ++pos)
!       {
!       originalBlockers.insert(*pos);
!       }
      }
  
--- 488,499 ----
        this->cmCurrentListFile = filename;
        }
!     }
! 
!   // loop over current function blockers and record them
!   for (std::list<cmFunctionBlocker *>::iterator pos 
!         = this->FunctionBlockers.begin();
!        pos != this->FunctionBlockers.end(); ++pos)
!     {
!     originalBlockers.insert(*pos);
      }
  
***************
*** 543,547 ****
    // add this list file to the list of dependencies
    this->ListFiles.push_back( filenametoread);
!   bool endScopeNicely = filename? true: false;
    const size_t numberFunctions = cacheFile.Functions.size();
    for(size_t i =0; i < numberFunctions; ++i)
--- 544,548 ----
    // add this list file to the list of dependencies
    this->ListFiles.push_back( filenametoread);
!   bool endScopeNicely = true;
    const size_t numberFunctions = cacheFile.Functions.size();
    for(size_t i =0; i < numberFunctions; ++i)
***************
*** 562,567 ****
      {
      // loop over all function blockers to see if any block this command
!     std::list<cmFunctionBlocker *>::iterator pos;
!     for (pos = this->FunctionBlockers.begin();
           pos != this->FunctionBlockers.end(); ++pos)
        {
--- 563,568 ----
      {
      // loop over all function blockers to see if any block this command
!     for (std::list<cmFunctionBlocker *>::iterator pos 
!          = this->FunctionBlockers.begin();
           pos != this->FunctionBlockers.end(); ++pos)
        {
***************
*** 721,724 ****
--- 722,726 ----
      cmCustomCommand cc(no_output, depends, commandLines, comment, workingDir);
      cc.SetEscapeOldStyle(escapeOldStyle);
+     cc.SetEscapeAllowMakeVars(true);
      switch(type)
        {
***************
*** 834,837 ****
--- 836,840 ----
                            comment, workingDir);
      cc->SetEscapeOldStyle(escapeOldStyle);
+     cc->SetEscapeAllowMakeVars(true);
      file->SetCustomCommand(cc);
      }

Index: cmFindProgramCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindProgramCommand.cxx,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -C 2 -d -r1.42 -r1.42.2.1
*** cmFindProgramCommand.cxx	23 Jan 2008 15:27:59 -0000	1.42
--- cmFindProgramCommand.cxx	13 Jun 2008 12:55:17 -0000	1.42.2.1
***************
*** 98,103 ****
    std::string program = "";
  
!   // First/last order taken care of in cmFindBase when the paths are setup.
!   if(this->SearchAppBundleFirst || this->SearchAppBundleLast)
      {
      program = FindAppBundle(names);
--- 98,102 ----
    std::string program = "";
  
!   if(this->SearchAppBundleFirst || this->SearchAppBundleOnly)
      {
      program = FindAppBundle(names);
***************
*** 108,111 ****
--- 107,114 ----
      }
  
+   if(program.empty() && this->SearchAppBundleLast)
+     {
+     program = this->FindAppBundle(names);
+     }
    return program;
  }

Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.58
retrieving revision 1.58.2.1
diff -C 2 -d -r1.58 -r1.58.2.1
*** cmFindLibraryCommand.cxx	11 Feb 2008 22:00:45 -0000	1.58
--- cmFindLibraryCommand.cxx	13 Jun 2008 12:55:17 -0000	1.58.2.1
***************
*** 97,113 ****
      }
  
!   std::string library;
!   for(std::vector<std::string>::iterator i = this->Names.begin();
!       i != this->Names.end() ; ++i)
      {
!     library = this->FindLibrary(i->c_str());
!     if(library != "")
!       {
!       this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
!                                          library.c_str(),
!                                          this->VariableDocumentation.c_str(),
!                                          cmCacheManager::FILEPATH);
!       return true;
!       } 
      }
    std::string notfound = this->VariableName + "-NOTFOUND";
--- 97,109 ----
      }
  
!   std::string library = this->FindLibrary();
!   if(library != "")
      {
!     // Save the value in the cache
!     this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
!                                        library.c_str(),
!                                        this->VariableDocumentation.c_str(),
!                                        cmCacheManager::FILEPATH);
!     return true;
      }
    std::string notfound = this->VariableName + "-NOTFOUND";
***************
*** 212,230 ****
  }
  
! std::string cmFindLibraryCommand::FindLibrary(const char* name)
  {
!   bool supportFrameworks = false;
!   bool onlyFrameworks = false;
!   std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
!   if(ff == "FIRST" || ff == "LAST")
      {
!     supportFrameworks = true;
      }
!   if(ff == "ONLY")
      {
!     onlyFrameworks = true;
!     supportFrameworks = true;
      }
!   
    const char* prefixes_list =
      this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_PREFIXES");
--- 208,234 ----
  }
  
! //----------------------------------------------------------------------------
! std::string cmFindLibraryCommand::FindLibrary()
  {
!   std::string library;
!   if(this->SearchFrameworkFirst || this->SearchFrameworkOnly)
      {
!     library = this->FindFrameworkLibrary();
      }
!   if(library.empty() && !this->SearchFrameworkOnly)
      {
!     library = this->FindNormalLibrary();
      }
!   if(library.empty() && this->SearchFrameworkLast)
!     {
!     library = this->FindFrameworkLibrary();
!     }
!   return library;
! }
! 
! //----------------------------------------------------------------------------
! std::string cmFindLibraryCommand::FindNormalLibrary()
! {
!   // Collect the list of library name prefixes/suffixes to try.
    const char* prefixes_list =
      this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_PREFIXES");
***************
*** 236,284 ****
    cmSystemTools::ExpandListArgument(suffixes_list, suffixes, true);
  
!   // If the original library name provided by the user matches one of
!   // the suffixes, try it first.
!   bool tryOrig = false;
!   {
!   std::string nm = name;
!   for(std::vector<std::string>::const_iterator si = suffixes.begin();
!       !tryOrig && si != suffixes.end(); ++si)
!     {
!     std::string const& suffix = *si;
!     if(nm.length() > suffix.length() &&
!        nm.substr(nm.size()-suffix.length()) == suffix)
!       {
!       tryOrig = true;
!       }
!     }
!   }
! 
!   // Add a trailing slash to all paths to aid the search process.
!   for(std::vector<std::string>::iterator i = this->SearchPaths.begin();
!       i != this->SearchPaths.end(); ++i)
!     {
!     std::string& p = *i;
!     if(p.empty() || p[p.size()-1] != '/')
!       {
!       p += "/";
!       }
!     }
    std::string tryPath;
!   for(std::vector<std::string>::const_iterator p = this->SearchPaths.begin();
!       p != this->SearchPaths.end(); ++p)
      {
!     if(supportFrameworks)
        {
!       tryPath = *p;
!       tryPath += name;
!       tryPath += ".framework";
!       if(cmSystemTools::FileExists(tryPath.c_str())
!          && cmSystemTools::FileIsDirectory(tryPath.c_str()))
          {
!         tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
!         cmSystemTools::ConvertToUnixSlashes(tryPath);
!         return tryPath;
          }
        }
!     if(!onlyFrameworks)
        {
        // Try the original library name as specified by the user.
--- 240,266 ----
    cmSystemTools::ExpandListArgument(suffixes_list, suffixes, true);
  
!   // Search the entire path for each name.
    std::string tryPath;
!   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
!       ni != this->Names.end() ; ++ni)
      {
!     // If the original library name provided by the user matches one of
!     // the suffixes, try it first.
!     bool tryOrig = false;
!     std::string const& name = *ni;
!     for(std::vector<std::string>::const_iterator si = suffixes.begin();
!         !tryOrig && si != suffixes.end(); ++si)
        {
!       std::string const& suffix = *si;
!       if(name.length() > suffix.length() &&
!          name.substr(name.size()-suffix.length()) == suffix)
          {
!         tryOrig = true;
          }
        }
! 
!     for(std::vector<std::string>::const_iterator
!           p = this->SearchPaths.begin();
!         p != this->SearchPaths.end(); ++p)
        {
        // Try the original library name as specified by the user.
***************
*** 320,321 ****
--- 302,326 ----
    return "";
  }
+ 
+ //----------------------------------------------------------------------------
+ std::string cmFindLibraryCommand::FindFrameworkLibrary()
+ {
+   // Search for a framework of each name in the entire search path.
+   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
+       ni != this->Names.end() ; ++ni)
+     {
+     // Search the paths for a framework with this name.
+     std::string fwName = *ni;
+     fwName += ".framework";
+     std::string fwPath = cmSystemTools::FindDirectory(fwName.c_str(),
+                                                       this->SearchPaths,
+                                                       true);
+     if(!fwPath.empty())
+       {
+       return fwPath;
+       }
+     }
+ 
+   // No framework found.
+   return "";
+ }

Index: cmFindBase.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.h,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C 2 -d -r1.13 -r1.13.2.1
*** cmFindBase.h	17 Jan 2008 14:02:31 -0000	1.13
--- cmFindBase.h	13 Jun 2008 12:55:17 -0000	1.13.2.1
***************
*** 42,58 ****
  protected:
    void PrintFindStuff();
!   void ExpandPaths(std::vector<std::string> userPaths);
  
-   // add to the SearchPaths
-   void AddPaths(std::vector<std::string>& paths);
-   void AddFrameWorkPaths();
-   void AddAppBundlePaths();
-   void AddEnvironmentVariables();
-   void AddFindPrefix(std::vector<std::string>& dest, 
-                      const std::vector<std::string>& src);
-   void AddCMakeVariables();
-   void AddSystemEnvironmentVariables();
-   void AddCMakeSystemVariables();
-   void ExpandRegistryAndCleanPath(std::vector<std::string>& paths);
    // see if the VariableName is already set in the cache,
    // also copy the documentation from the cache to VariableDocumentation
--- 42,48 ----
  protected:
    void PrintFindStuff();
!   void ExpandPaths();
!   void AddPathSuffixes();
  
    // see if the VariableName is already set in the cache,
    // also copy the documentation from the cache to VariableDocumentation
***************
*** 65,69 ****
    cmStdString VariableName;
    std::vector<std::string> Names;
-   std::vector<std::string> SearchPaths;
  
    // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
--- 55,58 ----
***************
*** 72,75 ****
--- 61,78 ----
    bool AlreadyInCache;
    bool AlreadyInCacheWithoutMetaInfo;
+ private:
+   // Add pieces of the search.
+   void AddCMakeEnvironmentPath();
+   void AddCMakeVariablePath();
+   void AddSystemEnvironmentPath();
+   void AddCMakeSystemVariablePath();
+   void AddUserHintsPath();
+   void AddUserGuessPath();
+ 
+   // Helpers.
+   void AddCMakePrefixPath(const char* variable);
+   void AddEnvPrefixPath(const char* variable);
+   void AddPrefixPaths(std::vector<std::string> const& in_paths,
+                       PathType pathType);
  };
  

Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -C 2 -d -r1.36 -r1.36.2.1
*** cmFindPackageCommand.cxx	29 Jan 2008 14:57:39 -0000	1.36
--- cmFindPackageCommand.cxx	13 Jun 2008 12:55:17 -0000	1.36.2.1
***************
*** 1,3 ****
! /*=========================================================================
  
    Program:   CMake - Cross-Platform Makefile Generator
--- 1,3 ----
!  /*=========================================================================
  
    Program:   CMake - Cross-Platform Makefile Generator
***************
*** 113,116 ****
--- 113,117 ----
      "               [NAMES name1 [name2 ...]]\n"
      "               [CONFIGS config1 [config2 ...]]\n"
+     "               [HINTS path1 [path2 ... ]]\n"
      "               [PATHS path1 [path2 ... ]]\n"
      "               [PATH_SUFFIXES suffix1 [suffix2 ...]]\n"
***************
*** 239,265 ****
      "as specified below.\n"
      "The set of installation prefixes is constructed using the following "
!     "steps.  If NO_DEFAULT_PATH is specified steps 1-5 are skipped.\n"
!     "1. Search cmake specific environment variables.  This "
!     "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "2. Search cmake variables with the same names as the cmake specific "
!     "environment variables.  These are intended to be used on the command "
!     "line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH "
!     "is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "3. Search the standard system environment variables. "
      "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed.  "
      "Path entries ending in \"/bin\" or \"/sbin\" are automatically "
      "converted to their parent directories.\n"
      "   PATH\n"
!     "4. Search project build trees recently configured in a CMake GUI.  "
      "This can be skipped if NO_CMAKE_BUILDS_PATH is passed.  "
      "It is intended for the case when a user is building multiple "
      "dependent projects one after another.\n"
!     "5. Search cmake variables defined in the Platform files "
      "for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH "
      "is passed.\n"
--- 240,270 ----
      "as specified below.\n"
      "The set of installation prefixes is constructed using the following "
!     "steps.  If NO_DEFAULT_PATH is specified all NO_* options are enabled.\n"
!     "1. Search paths specified in cmake-specific cache variables.  "
!     "These are intended to be used on the command line with a -DVAR=value.  "
!     "This can be skipped if NO_CMAKE_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "2. Search paths specified in cmake-specific environment variables.  "
!     "These are intended to be set in the user's shell configuration.  "
!     "This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n"
      "   CMAKE_PREFIX_PATH\n"
      "   CMAKE_FRAMEWORK_PATH\n"
      "   CMAKE_APPBUNDLE_PATH\n"
!     "3. Search paths specified by the HINTS option.  "
!     "These should be paths computed by system introspection, such as a "
!     "hint provided by the location of another item already found.  "
!     "Hard-coded guesses should be specified with the PATHS option.\n"
!     "4. Search the standard system environment variables. "
      "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed.  "
      "Path entries ending in \"/bin\" or \"/sbin\" are automatically "
      "converted to their parent directories.\n"
      "   PATH\n"
!     "5. Search project build trees recently configured in a CMake GUI.  "
      "This can be skipped if NO_CMAKE_BUILDS_PATH is passed.  "
      "It is intended for the case when a user is building multiple "
      "dependent projects one after another.\n"
!     "6. Search cmake variables defined in the Platform files "
      "for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH "
      "is passed.\n"
***************
*** 267,271 ****
      "   CMAKE_SYSTEM_FRAMEWORK_PATH\n"
      "   CMAKE_SYSTEM_APPBUNDLE_PATH\n"
!     "6. Search paths specified by the PATHS option.\n"
      ;
    this->CommandDocumentation += this->GenericDocumentationMacPolicy;
--- 272,277 ----
      "   CMAKE_SYSTEM_FRAMEWORK_PATH\n"
      "   CMAKE_SYSTEM_APPBUNDLE_PATH\n"
!     "7. Search paths specified by the PATHS option.  "
!     "These are typically hard-coded guesses.\n"
      ;
    this->CommandDocumentation += this->GenericDocumentationMacPolicy;
***************
*** 314,318 ****
    // Parse the arguments.
    enum Doing { DoingNone, DoingComponents, DoingNames, DoingPaths,
!                DoingPathSuffixes, DoingConfigs };
    Doing doing = DoingNone;
    cmsys::RegularExpression version("^[0-9.]+$");
--- 320,324 ----
    // Parse the arguments.
    enum Doing { DoingNone, DoingComponents, DoingNames, DoingPaths,
!                DoingPathSuffixes, DoingConfigs, DoingHints };
    Doing doing = DoingNone;
    cmsys::RegularExpression version("^[0-9.]+$");
***************
*** 358,361 ****
--- 364,373 ----
        doing = DoingPaths;
        }
+     else if(args[i] == "HINTS")
+       {
+       this->NoModule = true;
+       this->Compatibility_1_6 = false;
+       doing = DoingHints;
+       }
      else if(args[i] == "PATH_SUFFIXES")
        {
***************
*** 401,405 ****
      else if(doing == DoingPaths)
        {
!       this->AddUserPath(args[i]);
        }
      else if(doing == DoingPathSuffixes)
--- 413,421 ----
      else if(doing == DoingPaths)
        {
!       this->AddUserPath(args[i], this->UserPaths);
!       }
!     else if(doing == DoingHints)
!       {
!       this->AddUserPath(args[i], this->UserHints);
        }
      else if(doing == DoingPathSuffixes)
***************
*** 822,827 ****
  bool cmFindPackageCommand::FindPrefixedConfig()
  {
!   for(std::vector<std::string>::const_iterator pi = this->Prefixes.begin();
!       pi != this->Prefixes.end(); ++pi)
      {
      if(this->SearchPrefix(*pi))
--- 838,844 ----
  bool cmFindPackageCommand::FindPrefixedConfig()
  {
!   std::vector<std::string>& prefixes = this->SearchPaths;
!   for(std::vector<std::string>::const_iterator pi = prefixes.begin();
!       pi != prefixes.end(); ++pi)
      {
      if(this->SearchPrefix(*pi))
***************
*** 836,841 ****
  bool cmFindPackageCommand::FindFrameworkConfig()
  {
!   for(std::vector<std::string>::const_iterator i = this->Prefixes.begin();
!       i != this->Prefixes.end(); ++i)
      {
      if(this->SearchFrameworkPrefix(*i))
--- 853,859 ----
  bool cmFindPackageCommand::FindFrameworkConfig()
  {
!   std::vector<std::string>& prefixes = this->SearchPaths;
!   for(std::vector<std::string>::const_iterator i = prefixes.begin();
!       i != prefixes.end(); ++i)
      {
      if(this->SearchFrameworkPrefix(*i))
***************
*** 850,855 ****
  bool cmFindPackageCommand::FindAppBundleConfig()
  {
!   for(std::vector<std::string>::const_iterator i = this->Prefixes.begin();
!       i != this->Prefixes.end(); ++i)
      {
      if(this->SearchAppBundlePrefix(*i))
--- 868,874 ----
  bool cmFindPackageCommand::FindAppBundleConfig()
  {
!   std::vector<std::string>& prefixes = this->SearchPaths;
!   for(std::vector<std::string>::const_iterator i = prefixes.begin();
!       i != prefixes.end(); ++i)
      {
      if(this->SearchAppBundlePrefix(*i))
***************
*** 940,956 ****
  
  //----------------------------------------------------------------------------
! void cmFindPackageCommand::AddUserPath(std::string const& p)
  {
!   std::string userPath = p;
!   cmSystemTools::ExpandRegistryValues(userPath);
!   this->UserPaths.push_back(userPath);
  }
  
  //----------------------------------------------------------------------------
! void cmFindPackageCommand::ComputePrefixes()
  {
-   std::vector<std::string>& prefixes = this->Prefixes;
-   std::set<cmStdString> emmitted;
- 
    if(!this->NoCMakeEnvironmentPath && !this->NoDefaultPath)
      {
--- 959,977 ----
  
  //----------------------------------------------------------------------------
! void cmFindPackageCommand::ComputePrefixes()
  {
!   this->AddPrefixesCMakeVariable();
!   this->AddPrefixesCMakeEnvironment();
!   this->AddPrefixesUserHints();
!   this->AddPrefixesSystemEnvironment();
!   this->AddPrefixesBuilds();
!   this->AddPrefixesCMakeSystemVariable();
!   this->AddPrefixesUserGuess();
!   this->ComputeFinalPrefixes();
  }
  
  //----------------------------------------------------------------------------
! void cmFindPackageCommand::AddPrefixesCMakeEnvironment()
  {
    if(!this->NoCMakeEnvironmentPath && !this->NoDefaultPath)
      {
***************
*** 961,979 ****
        {
        cmSystemTools::ConvertToUnixSlashes(env);
!       this->AddPathInternal(prefixes, env, EnvPath, &emmitted);
        }
  
!     this->AddEnvPath(prefixes, "CMAKE_PREFIX_PATH", &emmitted);
!     this->AddEnvPath(prefixes, "CMAKE_FRAMEWORK_PATH", &emmitted);
!     this->AddEnvPath(prefixes, "CMAKE_APPBUNDLE_PATH", &emmitted);
      }
  
    if(!this->NoCMakePath && !this->NoDefaultPath)
      {
!     this->AddCMakePath(prefixes, "CMAKE_PREFIX_PATH", &emmitted);
!     this->AddCMakePath(prefixes, "CMAKE_FRAMEWORK_PATH", &emmitted);
!     this->AddCMakePath(prefixes, "CMAKE_APPBUNDLE_PATH", &emmitted);
      }
  
    if(!this->NoSystemEnvironmentPath && !this->NoDefaultPath)
      {
--- 982,1008 ----
        {
        cmSystemTools::ConvertToUnixSlashes(env);
!       this->AddPathInternal(env, EnvPath);
        }
  
!     this->AddEnvPath("CMAKE_PREFIX_PATH");
!     this->AddEnvPath("CMAKE_FRAMEWORK_PATH");
!     this->AddEnvPath("CMAKE_APPBUNDLE_PATH");
      }
+ }
  
+ //----------------------------------------------------------------------------
+ void cmFindPackageCommand::AddPrefixesCMakeVariable()
+ {
    if(!this->NoCMakePath && !this->NoDefaultPath)
      {
!     this->AddCMakePath("CMAKE_PREFIX_PATH");
!     this->AddCMakePath("CMAKE_FRAMEWORK_PATH");
!     this->AddCMakePath("CMAKE_APPBUNDLE_PATH");
      }
+ }
  
+ //----------------------------------------------------------------------------
+ void cmFindPackageCommand::AddPrefixesSystemEnvironment()
+ {
    if(!this->NoSystemEnvironmentPath && !this->NoDefaultPath)
      {
***************
*** 992,1006 ****
           d.size() >= 5 && strcmp(d.c_str()+d.size()-5, "/sbin") == 0)
          {
!         this->AddPathInternal(prefixes,
!                               cmSystemTools::GetFilenamePath(d),
!                               EnvPath, &emmitted);
          }
        else
          {
!         this->AddPathInternal(prefixes, d, EnvPath, &emmitted);
          }
        }
      }
  
    if(!this->NoBuilds && !this->NoDefaultPath)
      {
--- 1021,1037 ----
           d.size() >= 5 && strcmp(d.c_str()+d.size()-5, "/sbin") == 0)
          {
!         this->AddPathInternal(cmSystemTools::GetFilenamePath(d), EnvPath);
          }
        else
          {
!         this->AddPathInternal(d, EnvPath);
          }
        }
      }
+ }
  
+ //----------------------------------------------------------------------------
+ void cmFindPackageCommand::AddPrefixesBuilds()
+ {
    if(!this->NoBuilds && !this->NoDefaultPath)
      {
***************
*** 1018,1038 ****
           cmSystemTools::FileIsDirectory(f.c_str()))
          {
!         this->AddPathInternal(prefixes, f, FullPath, &emmitted);
          }
        }
      }
  
    if(!this->NoCMakeSystemPath && !this->NoDefaultPath)
      {
!     this->AddCMakePath(prefixes, "CMAKE_SYSTEM_PREFIX_PATH", &emmitted);
!     this->AddCMakePath(prefixes, "CMAKE_SYSTEM_FRAMEWORK_PATH", &emmitted);
!     this->AddCMakePath(prefixes, "CMAKE_SYSTEM_APPBUNDLE_PATH", &emmitted);
      }
  
!   if(!this->UserPaths.empty())
!     {
!     // Add paths specified by the caller.
!     this->AddPathsInternal(prefixes, this->UserPaths, CMakePath, &emmitted);
!     }
  
    // Construct the final set of prefixes.
--- 1049,1087 ----
           cmSystemTools::FileIsDirectory(f.c_str()))
          {
!         this->AddPathInternal(f, FullPath);
          }
        }
      }
+ }
  
+ //----------------------------------------------------------------------------
+ void cmFindPackageCommand::AddPrefixesCMakeSystemVariable()
+ {
    if(!this->NoCMakeSystemPath && !this->NoDefaultPath)
      {
!     this->AddCMakePath("CMAKE_SYSTEM_PREFIX_PATH");
!     this->AddCMakePath("CMAKE_SYSTEM_FRAMEWORK_PATH");
!     this->AddCMakePath("CMAKE_SYSTEM_APPBUNDLE_PATH");
      }
+ }
  
! //----------------------------------------------------------------------------
! void cmFindPackageCommand::AddPrefixesUserGuess()
! {
!   // Add guesses specified by the caller.
!   this->AddPathsInternal(this->UserPaths, CMakePath);
! }
! 
! //----------------------------------------------------------------------------
! void cmFindPackageCommand::AddPrefixesUserHints()
! {
!   // Add hints specified by the caller.
!   this->AddPathsInternal(this->UserHints, CMakePath);
! }
! 
! //----------------------------------------------------------------------------
! void cmFindPackageCommand::ComputeFinalPrefixes()
! {
!   std::vector<std::string>& prefixes = this->SearchPaths;
  
    // Construct the final set of prefixes.
***************
*** 1040,1052 ****
  
    // Add a trailing slash to all prefixes to aid the search process.
!   for(std::vector<std::string>::iterator i = prefixes.begin();
!       i != prefixes.end(); ++i)
!     {
!     std::string& prefix = *i;
!     if(prefix[prefix.size()-1] != '/')
!       {
!       prefix += "/";
!       }
!     }
  }
  
--- 1089,1093 ----
  
    // Add a trailing slash to all prefixes to aid the search process.
!   this->AddTrailingSlashes(prefixes);
  }
  

Index: cmAddCustomCommandCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomCommandCommand.cxx,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
diff -C 2 -d -r1.37.2.1 -r1.37.2.2
*** cmAddCustomCommandCommand.cxx	15 May 2008 19:39:50 -0000	1.37.2.1
--- cmAddCustomCommandCommand.cxx	13 Jun 2008 12:55:16 -0000	1.37.2.2
***************
*** 41,45 ****
    bool verbatim = false;
    bool append = false;
-   bool skip_rule_depends = false;
    std::string implicit_depends_lang;
    cmCustomCommand::ImplicitDependsList implicit_depends;
--- 41,44 ----
***************
*** 105,113 ****
        verbatim = true;
        }
-     else if(copy == "SKIP_RULE_DEPENDS")
-       {
-       doing = doing_nothing;
-       skip_rule_depends = true;
-       }
      else if(copy == "APPEND")
        {
--- 104,107 ----
***************
*** 317,322 ****
                                               escapeOldStyle);
  
!     // Get the rule object to add some extra information.
!     if(!implicit_depends.empty() || skip_rule_depends)
        {
        bool okay = false;
--- 311,316 ----
                                               escapeOldStyle);
  
!     // Add implicit dependency scanning requests if any were given.
!     if(!implicit_depends.empty())
        {
        bool okay = false;
***************
*** 327,340 ****
            {
            okay = true;
! 
!           // Add implicit dependency scanning requests if any were
!           // given.
!           if(!implicit_depends.empty())
!             {
!             cc->SetImplicitDepends(implicit_depends);
!             }
! 
!           // Set the rule dependency state.
!           cc->SetSkipRuleDepends(skip_rule_depends);
            }
          }
--- 321,325 ----
            {
            okay = true;
!           cc->SetImplicitDepends(implicit_depends);
            }
          }

Index: cmAddCustomCommandCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAddCustomCommandCommand.h,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -C 2 -d -r1.33.2.1 -r1.33.2.2
*** cmAddCustomCommandCommand.h	15 May 2008 19:39:50 -0000	1.33.2.1
--- cmAddCustomCommandCommand.h	13 Jun 2008 12:55:17 -0000	1.33.2.2
***************
*** 72,76 ****
        "                     [COMMAND command2 [ARGS] [args2...] ...]\n"
        "                     [MAIN_DEPENDENCY depend]\n"
!       "                     [DEPENDS [depends...]] [SKIP_RULE_DEPENDS]\n"
        "                     [IMPLICIT_DEPENDS <lang1> depend1 ...]\n"
        "                     [WORKING_DIRECTORY dir]\n"
--- 72,76 ----
        "                     [COMMAND command2 [ARGS] [args2...] ...]\n"
        "                     [MAIN_DEPENDENCY depend]\n"
!       "                     [DEPENDS [depends...]]\n"
        "                     [IMPLICIT_DEPENDS <lang1> depend1 ...]\n"
        "                     [WORKING_DIRECTORY dir]\n"
***************
*** 135,144 ****
        "SET_SOURCE_FILES_PROPERTIES.\n"
  
-       "The SKIP_RULE_DEPENDS option prevents the custom build rule from "
-       "having a dependency on itself.  This prevents the rule from running "
-       "again just because the command changed but is useful to create "
-       "rules that have absolutely no dependencies.  Such rules run only "
-       "when the output file is missing.\n"
- 
        "The IMPLICIT_DEPENDS option requests scanning of implicit "
        "dependencies of an input file.  The language given specifies the "
--- 135,138 ----

Index: cmFindCommon.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindCommon.cxx,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C 2 -d -r1.1 -r1.1.2.1
*** cmFindCommon.cxx	17 Jan 2008 14:02:31 -0000	1.1
--- cmFindCommon.cxx	13 Jun 2008 12:55:17 -0000	1.1.2.1
***************
*** 77,88 ****
      "is used then only the re-rooted directories will be searched.\n";
    this->GenericDocumentationPathsOrder =
!     "The reason the paths listed in the call to the command are searched "
!     "last is that most users of CMake would expect things to be found "
!     "first in the locations specified by their environment.  Projects may "
!     "override this behavior by simply calling the command twice:\n"
      "   FIND_XXX(FIND_ARGS_XXX PATHS paths... NO_DEFAULT_PATH)\n"
      "   FIND_XXX(FIND_ARGS_XXX)\n"
!     "Once one of these calls succeeds the result variable will be set "
!     "and stored in the cache so that neither call will search again.";
  }
  
--- 77,88 ----
      "is used then only the re-rooted directories will be searched.\n";
    this->GenericDocumentationPathsOrder =
!     "The default search order is designed to be most-specific to "
!     "least-specific for common use cases.  "
!     "Projects may override the order by simply calling the command "
!     "multiple times and using the NO_* options:\n"
      "   FIND_XXX(FIND_ARGS_XXX PATHS paths... NO_DEFAULT_PATH)\n"
      "   FIND_XXX(FIND_ARGS_XXX)\n"
!     "Once one of the calls succeeds the result variable will be set "
!     "and stored in the cache so that no call will search again.";
  }
  
***************
*** 323,413 ****
  
  //----------------------------------------------------------------------------
! void cmFindCommon::GetAppBundlePaths(std::vector<std::string>& paths)
  {
!   if(this->NoDefaultPath)
!     {
!     return;
!     }
!   std::vector<std::string> tmp;
! 
!   // first environment variables
!   if(!this->NoCMakeEnvironmentPath)
!     {
!     cmSystemTools::GetPath(tmp, "CMAKE_APPBUNDLE_PATH");
!     this->AddPathsInternal(paths, tmp, EnvPath);
!     tmp.clear();
!     }
! 
!   // add cmake variables
!   if(!this->NoCMakePath)
!     {
!     if(const char* path =
!        this->Makefile->GetDefinition("CMAKE_APPBUNDLE_PATH"))
!       {
!       cmSystemTools::ExpandListArgument(path, tmp);
!       this->AddPathsInternal(paths, tmp, CMakePath);
!       tmp.clear();
!       }
!     }
! 
!   // add cmake system variables
!   if(!this->NoCMakeSystemPath)
      {
!     if(const char* path =
!        this->Makefile->GetDefinition("CMAKE_SYSTEM_APPBUNDLE_PATH"))
        {
!       cmSystemTools::ExpandListArgument(path, tmp);
!       this->AddPathsInternal(paths, tmp, CMakePath);
!       tmp.clear();
        }
      }
- }
- 
- //----------------------------------------------------------------------------
- void cmFindCommon::GetFrameworkPaths(std::vector<std::string>& paths)
- {
-   if(this->NoDefaultPath)
-     {
-     return;
-     }
-   std::vector<std::string> tmp;
  
!   // first environment variables
!   if(!this->NoCMakeEnvironmentPath)
!     {
!     cmSystemTools::GetPath(tmp, "CMAKE_FRAMEWORK_PATH");
!     this->AddPathsInternal(paths, tmp, EnvPath);
!     tmp.clear();
!     }
! 
!   // add cmake variables
!   if(!this->NoCMakePath)
!     {
!     if(const char* path =
!        this->Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH"))
!       {
!       cmSystemTools::ExpandListArgument(path, tmp);
!       this->AddPathsInternal(paths, tmp, CMakePath);
!       tmp.clear();
!       }
!     }
  
!   // add cmake system variables
!   if(!this->NoCMakeSystemPath)
      {
!     if(const char* path =
!        this->Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH"))
!       {
!       cmSystemTools::ExpandListArgument(path, tmp);
!       this->AddPathsInternal(paths, tmp, CMakePath);
!       tmp.clear();
!       }
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddCMakePath(std::vector<std::string>& out_paths,
!                                 const char* variable,
!                                 std::set<cmStdString>* emmitted)
  {
    // Get a path from a CMake variable.
--- 323,360 ----
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddUserPath(std::string const& p,
!                                std::vector<std::string>& paths)
  {
!   // We should view the registry as the target application would view
!   // it.
!   cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32;
!   cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64;
!   if(const char* psize =
!      this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
      {
!     if(atoi(psize) == 8)
        {
!       view = cmSystemTools::KeyWOW64_64;
!       other_view = cmSystemTools::KeyWOW64_32;
        }
      }
  
!   // Expand using the view of the target application.
!   std::string expanded = p;
!   cmSystemTools::ExpandRegistryValues(expanded, view);
!   cmSystemTools::GlobDirs(expanded.c_str(), paths);
  
!   // Executables can be either 32-bit or 64-bit, so expand using the
!   // alternative view.
!   if(expanded != p && this->CMakePathName == "PROGRAM")
      {
!     expanded = p;
!     cmSystemTools::ExpandRegistryValues(expanded, other_view);
!     cmSystemTools::GlobDirs(expanded.c_str(), paths);
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddCMakePath(const char* variable)
  {
    // Get a path from a CMake variable.
***************
*** 419,430 ****
      // Relative paths are interpreted with respect to the current
      // source directory.
!     this->AddPathsInternal(out_paths, tmp, CMakePath, emmitted);
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddEnvPath(std::vector<std::string>& out_paths,
!                               const char* variable,
!                               std::set<cmStdString>* emmitted)
  {
    // Get a path from the environment.
--- 366,375 ----
      // Relative paths are interpreted with respect to the current
      // source directory.
!     this->AddPathsInternal(tmp, CMakePath);
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddEnvPath(const char* variable)
  {
    // Get a path from the environment.
***************
*** 434,458 ****
    // Relative paths are interpreted with respect to the current
    // working directory.
!   this->AddPathsInternal(out_paths, tmp, EnvPath, emmitted);
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddPathsInternal(std::vector<std::string>& out_paths,
!                                     std::vector<std::string> const& in_paths,
!                                     PathType pathType,
!                                     std::set<cmStdString>* emmitted)
  {
    for(std::vector<std::string>::const_iterator i = in_paths.begin();
        i != in_paths.end(); ++i)
      {
!     this->AddPathInternal(out_paths, *i, pathType, emmitted);
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddPathInternal(std::vector<std::string>& out_paths,
!                                    std::string const& in_path,
!                                    PathType pathType,
!                                    std::set<cmStdString>* emmitted)
  {
    if(in_path.empty())
--- 379,399 ----
    // Relative paths are interpreted with respect to the current
    // working directory.
!   this->AddPathsInternal(tmp, EnvPath);
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddPathsInternal(std::vector<std::string> const& in_paths,
!                                     PathType pathType)
  {
    for(std::vector<std::string>::const_iterator i = in_paths.begin();
        i != in_paths.end(); ++i)
      {
!     this->AddPathInternal(*i, pathType);
      }
  }
  
  //----------------------------------------------------------------------------
! void cmFindCommon::AddPathInternal(std::string const& in_path,
!                                    PathType pathType)
  {
    if(in_path.empty())
***************
*** 472,479 ****
      cmSystemTools::CollapseFullPath(in_path.c_str(), relbase);
  
!   // Insert the path if has not already been emmitted.
!   if(!emmitted || emmitted->insert(fullPath).second)
      {
!     out_paths.push_back(fullPath.c_str());
      }
  }
--- 413,435 ----
      cmSystemTools::CollapseFullPath(in_path.c_str(), relbase);
  
!   // Insert the path if has not already been emitted.
!   if(this->SearchPathsEmitted.insert(fullPath).second)
      {
!     this->SearchPaths.push_back(fullPath.c_str());
!     }
! }
! 
! //----------------------------------------------------------------------------
! void cmFindCommon::AddTrailingSlashes(std::vector<std::string>& paths)
! {
!   // Add a trailing slash to all paths to aid the search process.
!   for(std::vector<std::string>::iterator i = paths.begin();
!       i != paths.end(); ++i)
!     {
!     std::string& p = *i;
!     if(!p.empty() && p[p.size()-1] != '/')
!       {
!       p += "/";
!       }
      }
  }

Index: cmFindLibraryCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.h,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -C 2 -d -r1.27 -r1.27.2.1
*** cmFindLibraryCommand.h	31 Jan 2008 12:50:40 -0000	1.27
--- cmFindLibraryCommand.h	13 Jun 2008 12:55:17 -0000	1.27.2.1
***************
*** 69,73 ****
    void AddArchitecturePaths(const char* suffix);
    void AddLib64Paths();
!   std::string FindLibrary(const char* name);
  };
  
--- 69,76 ----
    void AddArchitecturePaths(const char* suffix);
    void AddLib64Paths();
!   std::string FindLibrary();
! private:
!   std::string FindNormalLibrary();
!   std::string FindFrameworkLibrary();
  };
  

Index: cmGlobalUnixMakefileGenerator3.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.h,v
retrieving revision 1.55
retrieving revision 1.55.2.1
diff -C 2 -d -r1.55 -r1.55.2.1
*** cmGlobalUnixMakefileGenerator3.h	14 Feb 2008 21:42:29 -0000	1.55
--- cmGlobalUnixMakefileGenerator3.h	13 Jun 2008 12:55:17 -0000	1.55.2.1
***************
*** 116,120 ****
    // returns some progress informaiton
    int GetTargetTotalNumberOfActions(cmTarget & target,
!                                     std::set<cmStdString> &emitted);
    unsigned long GetNumberOfProgressActionsInAll
    (cmLocalUnixMakefileGenerator3 *lg);
--- 116,120 ----
    // returns some progress informaiton
    int GetTargetTotalNumberOfActions(cmTarget & target,
!                                     std::set<cmTarget *> &emitted);
    unsigned long GetNumberOfProgressActionsInAll
    (cmLocalUnixMakefileGenerator3 *lg);

Index: cmFindPathCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPathCommand.h,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C 2 -d -r1.18 -r1.18.2.1
*** cmFindPathCommand.h	23 Jan 2008 15:27:59 -0000	1.18
--- cmFindPathCommand.h	13 Jun 2008 12:55:17 -0000	1.18.2.1
***************
*** 65,74 ****
      }
  
-   std::string FindHeaderInFramework( std::string& file,
-                                      std::string& dir);
    virtual const char* GetFullDocumentation();
    cmTypeMacro(cmFindPathCommand, cmFindBase);
    bool IncludeFileInPath;
    bool ExtraDocAdded;
  };
  
--- 65,78 ----
      }
  
    virtual const char* GetFullDocumentation();
    cmTypeMacro(cmFindPathCommand, cmFindBase);
    bool IncludeFileInPath;
    bool ExtraDocAdded;
+ private:
+   std::string FindHeaderInFramework(std::string const& file,
+                                     std::string const& dir);
+   std::string FindHeader();
+   std::string FindNormalHeader();
+   std::string FindFrameworkHeader();
  };
  

Index: cmFindPathCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPathCommand.cxx,v
retrieving revision 1.41
retrieving revision 1.41.2.1
diff -C 2 -d -r1.41 -r1.41.2.1
*** cmFindPathCommand.cxx	23 Jan 2008 15:27:59 -0000	1.41
--- cmFindPathCommand.cxx	13 Jun 2008 12:55:17 -0000	1.41.2.1
***************
*** 96,160 ****
      return true;
      }
!   std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
!   bool supportFrameworks = true;
!   if( ff.size() == 0 || ff == "NEVER" )
!     {
!     supportFrameworks = false;
!     }
!   std::string framework;
!   // Add a trailing slash to all paths to aid the search process.
!   for(std::vector<std::string>::iterator i = this->SearchPaths.begin();
!       i != this->SearchPaths.end(); ++i)
!     {
!     std::string& p = *i;
!     if(p.empty() || p[p.size()-1] != '/')
!       {
!       p += "/";
!       }
!     }
!   // Use the search path to find the file.
!   unsigned int k;
!   std::string result;
!   for(k=0; k < this->SearchPaths.size(); k++)
      {
!     for(unsigned int j =0; j < this->Names.size(); ++j)
!       {
!       // if frameworks are supported try to find the header in a framework
!       std::string tryPath;
!       if(supportFrameworks)
!         {
!         tryPath = this->FindHeaderInFramework(this->Names[j],
!                                               this->SearchPaths[k]);
!         if(tryPath.size())
!           {
!           result = tryPath;
!           }
!         }
!       if(result.size() == 0)
!         {
!         tryPath = this->SearchPaths[k];
!         tryPath += this->Names[j];
!         if(cmSystemTools::FileExists(tryPath.c_str()))
!           {
!           if(this->IncludeFileInPath)
!             {
!             result = tryPath;
!             }
!           else
!             {
!             result = this->SearchPaths[k];
!             }
!           }
!         }
!       if(result.size() != 0)
!         {
!         this->Makefile->AddCacheDefinition
!           (this->VariableName.c_str(), result.c_str(),
!            this->VariableDocumentation.c_str(),
!            (this->IncludeFileInPath) ? 
!            cmCacheManager::FILEPATH :cmCacheManager::PATH);
!         return true;
!         }
!       }
      }
    this->Makefile->AddCacheDefinition
--- 96,109 ----
      return true;
      }
! 
!   std::string result = this->FindHeader();
!   if(result.size() != 0)
      {
!     this->Makefile->AddCacheDefinition
!       (this->VariableName.c_str(), result.c_str(),
!        this->VariableDocumentation.c_str(),
!        (this->IncludeFileInPath) ?
!        cmCacheManager::FILEPATH :cmCacheManager::PATH);
!     return true;
      }
    this->Makefile->AddCacheDefinition
***************
*** 167,172 ****
  }
  
! std::string cmFindPathCommand::FindHeaderInFramework(std::string& file,
!                                                      std::string& dir)
  {
    cmStdString fileName = file;
--- 116,141 ----
  }
  
! //----------------------------------------------------------------------------
! std::string cmFindPathCommand::FindHeader()
! {
!   std::string header;
!   if(this->SearchFrameworkFirst || this->SearchFrameworkOnly)
!     {
!     header = this->FindFrameworkHeader();
!     }
!   if(header.empty() && !this->SearchFrameworkOnly)
!     {
!     header = this->FindNormalHeader();
!     }
!   if(header.empty() && this->SearchFrameworkLast)
!     {
!     header = this->FindFrameworkHeader();
!     }
!   return header;
! }
! 
! std::string
! cmFindPathCommand::FindHeaderInFramework(std::string const& file,
!                                          std::string const& dir)
  {
    cmStdString fileName = file;
***************
*** 208,214 ****
      }
    // if it is not found yet or not a framework header, then do a glob search
!   // for all files in dir/*/Headers/
    cmStdString glob = dir;
!   glob += "*/Headers/";
    glob += file;
    cmsys::Glob globIt;
--- 177,183 ----
      }
    // if it is not found yet or not a framework header, then do a glob search
!   // for all frameworks in the directory: dir/*.framework/Headers/<file>
    cmStdString glob = dir;
!   glob += "*.framework/Headers/";
    glob += file;
    cmsys::Glob globIt;
***************
*** 228,229 ****
--- 197,246 ----
  }
  
+ //----------------------------------------------------------------------------
+ std::string cmFindPathCommand::FindNormalHeader()
+ {
+   std::string tryPath;
+   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
+       ni != this->Names.end() ; ++ni)
+     {
+     for(std::vector<std::string>::const_iterator
+           p = this->SearchPaths.begin();
+         p != this->SearchPaths.end(); ++p)
+       {
+       tryPath = *p;
+       tryPath += *ni;
+       if(cmSystemTools::FileExists(tryPath.c_str()))
+         {
+         if(this->IncludeFileInPath)
+           {
+           return tryPath;
+           }
+         else
+           {
+           return *p;
+           }
+         }
+       }
+     }
+   return "";
+ }
+ 
+ //----------------------------------------------------------------------------
+ std::string cmFindPathCommand::FindFrameworkHeader()
+ {
+   for(std::vector<std::string>::const_iterator ni = this->Names.begin();
+       ni != this->Names.end() ; ++ni)
+     {
+     for(std::vector<std::string>::const_iterator
+           p = this->SearchPaths.begin();
+         p != this->SearchPaths.end(); ++p)
+       {
+       std::string fwPath = this->FindHeaderInFramework(*ni, *p);
+       if(!fwPath.empty())
+         {
+         return fwPath;
+         }
+       }
+     }
+   return "";
+ }



More information about the Cmake-commits mailing list