MCPcopy Create free account
hub / github.com/Kitware/CMake / FindDevEnvCommand

Method FindDevEnvCommand

Source/cmGlobalVisualStudio7Generator.cxx:145–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand()
146{
147 std::string vscmd;
148 std::string vskey;
149
150 // Search in standard location.
151 vskey = cmStrCat(this->GetRegistryBase(), ";InstallDir");
152 if (cmSystemTools::ReadRegistryValue(vskey, vscmd,
153 cmSystemTools::KeyWOW64_32)) {
154 cmSystemTools::ConvertToUnixSlashes(vscmd);
155 vscmd += "/devenv.com";
156 if (cmSystemTools::FileExists(vscmd, true)) {
157 return vscmd;
158 }
159 }
160
161 // Search where VS15Preview places it.
162 vskey =
163 cmStrCat(R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7;)",
164 this->GetIDEVersion());
165 if (cmSystemTools::ReadRegistryValue(vskey, vscmd,
166 cmSystemTools::KeyWOW64_32)) {
167 cmSystemTools::ConvertToUnixSlashes(vscmd);
168 vscmd += "/Common7/IDE/devenv.com";
169 if (cmSystemTools::FileExists(vscmd, true)) {
170 return vscmd;
171 }
172 }
173
174 vscmd = "devenv.com";
175 return vscmd;
176}
177
178std::vector<cmGlobalGenerator::GeneratedMakeCommand>
179cmGlobalVisualStudio7Generator::GenerateBuildCommand(

Calls 4

GetRegistryBaseMethod · 0.80
GetIDEVersionMethod · 0.80
cmStrCatFunction · 0.70
FileExistsFunction · 0.50

Tested by

no test coverage detected