Merge topic 'vs-minor-cleanups'

042aca55 VS: Verify that MSBuild.exe and devenv.com exist before using them
a756c74d Help: Clarify meaning of MSVC<NN> variables
This commit is contained in:
Brad King 2016-09-07 09:48:21 -04:00 committed by CMake Topic Stage
commit 6137054744
8 changed files with 32 additions and 25 deletions

View File

@ -1,6 +1,5 @@
MSVC10 MSVC10
------ ------
``True`` when using Microsoft Visual C++ 10.0 ``True`` when using the Microsoft Visual Studio ``v100`` toolset
(``cl`` version 16) or another compiler that simulates it.
Set to ``true`` when the compiler is version 10.0 of Microsoft Visual C++.

View File

@ -1,6 +1,5 @@
MSVC11 MSVC11
------ ------
``True`` when using Microsoft Visual C++ 11.0 ``True`` when using the Microsoft Visual Studio ``v110`` toolset
(``cl`` version 17) or another compiler that simulates it.
Set to ``true`` when the compiler is version 11.0 of Microsoft Visual C++.

View File

@ -1,6 +1,5 @@
MSVC12 MSVC12
------ ------
``True`` when using Microsoft Visual C++ 12.0. ``True`` when using the Microsoft Visual Studio ``v120`` toolset
(``cl`` version 18) or another compiler that simulates it.
Set to ``true`` when the compiler is version 12.0 of Microsoft Visual C++.

View File

@ -1,6 +1,5 @@
MSVC14 MSVC14
------ ------
``True`` when using Microsoft Visual C++ 14.0. ``True`` when using the Microsoft Visual Studio ``v140`` toolset
(``cl`` version 19) or another compiler that simulates it.
Set to ``true`` when the compiler is version 14.0 of Microsoft Visual C++.

View File

@ -1,6 +1,5 @@
MSVC80 MSVC80
------ ------
``True`` when using Microsoft Visual C++ 8.0. ``True`` when using the Microsoft Visual Studio ``v80`` toolset
(``cl`` version 14) or another compiler that simulates it.
Set to ``true`` when the compiler is version 8.0 of Microsoft Visual C++.

View File

@ -1,6 +1,5 @@
MSVC90 MSVC90
------ ------
``True`` when using Microsoft Visual C++ 9.0. ``True`` when using the Microsoft Visual Studio ``v90`` toolset
(``cl`` version 15) or another compiler that simulates it.
Set to ``true`` when the compiler is version 9.0 of Microsoft Visual C++.

View File

@ -350,16 +350,22 @@ std::string const& cmGlobalVisualStudio10Generator::GetMSBuildCommand()
std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand() std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand()
{ {
std::string msbuild; std::string msbuild;
std::string mskey = std::string mskey;
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\";
// Search in standard location.
mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\";
mskey += this->GetToolsVersion(); mskey += this->GetToolsVersion();
mskey += ";MSBuildToolsPath"; mskey += ";MSBuildToolsPath";
if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild, if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild,
cmSystemTools::KeyWOW64_32)) { cmSystemTools::KeyWOW64_32)) {
cmSystemTools::ConvertToUnixSlashes(msbuild); cmSystemTools::ConvertToUnixSlashes(msbuild);
msbuild += "/"; msbuild += "/MSBuild.exe";
if (cmSystemTools::FileExists(msbuild, true)) {
return msbuild;
}
} }
msbuild += "MSBuild.exe";
msbuild = "MSBuild.exe";
return msbuild; return msbuild;
} }

View File

@ -150,13 +150,20 @@ std::string const& cmGlobalVisualStudio7Generator::GetDevEnvCommand()
std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand() std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand()
{ {
std::string vscmd; 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, if (cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd,
cmSystemTools::KeyWOW64_32)) { cmSystemTools::KeyWOW64_32)) {
cmSystemTools::ConvertToUnixSlashes(vscmd); cmSystemTools::ConvertToUnixSlashes(vscmd);
vscmd += "/"; vscmd += "/devenv.com";
if (cmSystemTools::FileExists(vscmd, true)) {
return vscmd;
}
} }
vscmd += "devenv.com";
vscmd = "devenv.com";
return vscmd; return vscmd;
} }