[Cmake-commits] [cmake-commits] king committed cmFindBase.cxx 1.40 1.41

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jun 5 09:54:30 EDT 2008


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

Modified Files:
	cmFindBase.cxx 
Log Message:
BUG: Fix 64-bit build of CMake so it can find 32-bit VS install.

  - cmFindBase should search both 32-bit and 64-bit registry views
    for FIND_PROGRAM even if CMAKE_SIZEOF_VOID_P is not set.
  - Needed because the variable is not available when CMAKE_MAKE_PROGRAM
    is to be found.


Index: cmFindBase.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindBase.cxx,v
retrieving revision 1.40
retrieving revision 1.41
diff -C 2 -d -r1.40 -r1.41
*** cmFindBase.cxx	27 May 2008 20:50:04 -0000	1.40
--- cmFindBase.cxx	5 Jun 2008 13:54:28 -0000	1.41
***************
*** 478,501 ****
    // 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;
--- 478,492 ----
    // 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;
        }
      }
    std::vector<std::string> finalPath;
    std::vector<std::string>::iterator i;
***************
*** 508,513 ****
      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.
--- 499,503 ----
      cmSystemTools::ExpandRegistryValues(expanded, view);
      cmSystemTools::GlobDirs(expanded.c_str(), finalPath);
!     if(expanded != *i && this->CMakePathName == "PROGRAM")
        {
        // Executables can be either 32-bit or 64-bit.



More information about the Cmake-commits mailing list