| 71 | } |
| 72 | |
| 73 | static void AddRegistryPath(std::vector<std::string>& paths, |
| 74 | std::string const& path, cmMakefile* mf) |
| 75 | { |
| 76 | // We should view the registry as the target application would view |
| 77 | // it. |
| 78 | cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32; |
| 79 | cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64; |
| 80 | if (mf->PlatformIs64Bit()) { |
| 81 | view = cmSystemTools::KeyWOW64_64; |
| 82 | other_view = cmSystemTools::KeyWOW64_32; |
| 83 | } |
| 84 | |
| 85 | // Expand using the view of the target application. |
| 86 | std::string expanded = path; |
| 87 | cmSystemTools::ExpandRegistryValues(expanded, view); |
| 88 | cmSystemTools::GlobDirs(expanded, paths); |
| 89 | |
| 90 | // Executables can be either 32-bit or 64-bit, so expand using the |
| 91 | // alternative view. |
| 92 | expanded = path; |
| 93 | cmSystemTools::ExpandRegistryValues(expanded, other_view); |
| 94 | cmSystemTools::GlobDirs(expanded, paths); |
| 95 | } |
| 96 | |
| 97 | static void AddEnvPath(std::vector<std::string>& paths, std::string const& var, |
| 98 | std::string const& suffix) |
no test coverage detected
searching dependent graphs…