diff options
author | Brad King <brad.king@kitware.com> | 2008-06-05 13:54:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-05 13:54:28 (GMT) |
commit | a9a33a5c5e1b2d396e6844bcdb99f7a72e26b61e (patch) | |
tree | c7149f09a540c08caaff4924bf92015afad35c44 | |
parent | 958dc2709fc84f0843eb078ce81e23cec6db7996 (diff) | |
download | CMake-a9a33a5c5e1b2d396e6844bcdb99f7a72e26b61e.zip CMake-a9a33a5c5e1b2d396e6844bcdb99f7a72e26b61e.tar.gz CMake-a9a33a5c5e1b2d396e6844bcdb99f7a72e26b61e.tar.bz2 |
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.
-rw-r--r-- | Source/cmFindBase.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 8d519bc..ccc20a9 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -477,26 +477,17 @@ 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; - { + cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32; + cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64; if(const char* psize = this->Makefile->GetDefinition("CMAKE_SIZEOF_VOID_P")) { - switch(atoi(psize)) + if(atoi(psize) == 8) { - 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; + view = cmSystemTools::KeyWOW64_64; + other_view = cmSystemTools::KeyWOW64_32; } } - } std::vector<std::string> finalPath; std::vector<std::string>::iterator i; // glob and expand registry stuff from paths and put @@ -507,8 +498,7 @@ void cmFindBase::ExpandRegistryAndCleanPath(std::vector<std::string>& paths) std::string expanded = *i; cmSystemTools::ExpandRegistryValues(expanded, view); cmSystemTools::GlobDirs(expanded.c_str(), finalPath); - if(view != other_view && expanded != *i && - this->CMakePathName == "PROGRAM") + if(expanded != *i && this->CMakePathName == "PROGRAM") { // Executables can be either 32-bit or 64-bit. expanded = *i; |