[Cmake-commits] [cmake-commits] king committed cmFindBase.cxx 1.38 1.39

cmake-commits at cmake.org cmake-commits at cmake.org
Tue May 27 14:47:48 EDT 2008


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

Modified Files:
	cmFindBase.cxx 
Log Message:
BUG: Fix registry lookups for FIND commands to use view of target platform.

  - See issue #7095.


Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -C 2 -d -r1.38 -r1.39
*** cmFindBase.cxx	23 May 2008 19:52:15 -0000	1.38
--- cmFindBase.cxx	27 May 2008 18:47:46 -0000	1.39
***************
*** 476,479 ****
--- 476,494 ----
  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;
+   {
+   if(const char* psize =
+      this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P"))
+     {
+     switch(atoi(psize))
+       {
+       case 4: view = cmSystemTools::KeyWOW64_32; break;
+       case 8: view = cmSystemTools::KeyWOW64_64; break;
+       default: break;
+       }
+     }
+   }
    std::vector<std::string> finalPath;
    std::vector<std::string>::iterator i;
***************
*** 483,487 ****
        i != paths.end(); ++i)
      {
!     cmSystemTools::ExpandRegistryValues(*i);
      cmSystemTools::GlobDirs(i->c_str(), finalPath);
      }
--- 498,502 ----
        i != paths.end(); ++i)
      {
!     cmSystemTools::ExpandRegistryValues(*i, view);
      cmSystemTools::GlobDirs(i->c_str(), finalPath);
      }



More information about the Cmake-commits mailing list