diff options
author | Brad King <brad.king@kitware.com> | 2016-09-06 13:50:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-06 14:22:39 (GMT) |
commit | 042aca557defd72d7205becb7e54c9f93793b496 (patch) | |
tree | e4ea9abda3645f15eba01715c2d3eaaf3de471a8 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | a756c74da58196f670633c1d08840dc6e3d62fea (diff) | |
download | CMake-042aca557defd72d7205becb7e54c9f93793b496.zip CMake-042aca557defd72d7205becb7e54c9f93793b496.tar.gz CMake-042aca557defd72d7205becb7e54c9f93793b496.tar.bz2 |
VS: Verify that MSBuild.exe and devenv.com exist before using them
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 08be304..8d3964f 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -150,13 +150,20 @@ std::string const& cmGlobalVisualStudio7Generator::GetDevEnvCommand() std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand() { std::string vscmd; - std::string vskey = this->GetRegistryBase() + ";InstallDir"; + std::string vskey; + + // Search in standard location. + vskey = this->GetRegistryBase() + ";InstallDir"; if (cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd, cmSystemTools::KeyWOW64_32)) { cmSystemTools::ConvertToUnixSlashes(vscmd); - vscmd += "/"; + vscmd += "/devenv.com"; + if (cmSystemTools::FileExists(vscmd, true)) { + return vscmd; + } } - vscmd += "devenv.com"; + + vscmd = "devenv.com"; return vscmd; } |