summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-07 13:48:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-07 13:48:21 (GMT)
commit6137054744e262cf8b1ddebfa4a08e00a0feffed (patch)
tree6e770ca6f3c2a62f1db4465791f92dd67410cc26
parent48b33b0633f61d453146e2ce4813b9731c6f0836 (diff)
parent042aca557defd72d7205becb7e54c9f93793b496 (diff)
downloadCMake-6137054744e262cf8b1ddebfa4a08e00a0feffed.zip
CMake-6137054744e262cf8b1ddebfa4a08e00a0feffed.tar.gz
CMake-6137054744e262cf8b1ddebfa4a08e00a0feffed.tar.bz2
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
-rw-r--r--Help/variable/MSVC10.rst5
-rw-r--r--Help/variable/MSVC11.rst5
-rw-r--r--Help/variable/MSVC12.rst5
-rw-r--r--Help/variable/MSVC14.rst5
-rw-r--r--Help/variable/MSVC80.rst5
-rw-r--r--Help/variable/MSVC90.rst5
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx14
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx13
8 files changed, 32 insertions, 25 deletions
diff --git a/Help/variable/MSVC10.rst b/Help/variable/MSVC10.rst
index 33692ad..98e0493 100644
--- a/Help/variable/MSVC10.rst
+++ b/Help/variable/MSVC10.rst
@@ -1,6 +1,5 @@
MSVC10
------
-``True`` when using Microsoft Visual C++ 10.0
-
-Set to ``true`` when the compiler is version 10.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v100`` toolset
+(``cl`` version 16) or another compiler that simulates it.
diff --git a/Help/variable/MSVC11.rst b/Help/variable/MSVC11.rst
index 3ab606d..42b7b86 100644
--- a/Help/variable/MSVC11.rst
+++ b/Help/variable/MSVC11.rst
@@ -1,6 +1,5 @@
MSVC11
------
-``True`` when using Microsoft Visual C++ 11.0
-
-Set to ``true`` when the compiler is version 11.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v110`` toolset
+(``cl`` version 17) or another compiler that simulates it.
diff --git a/Help/variable/MSVC12.rst b/Help/variable/MSVC12.rst
index 15fa64b..0648f35 100644
--- a/Help/variable/MSVC12.rst
+++ b/Help/variable/MSVC12.rst
@@ -1,6 +1,5 @@
MSVC12
------
-``True`` when using Microsoft Visual C++ 12.0.
-
-Set to ``true`` when the compiler is version 12.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v120`` toolset
+(``cl`` version 18) or another compiler that simulates it.
diff --git a/Help/variable/MSVC14.rst b/Help/variable/MSVC14.rst
index 0b9125d..f67ebc7 100644
--- a/Help/variable/MSVC14.rst
+++ b/Help/variable/MSVC14.rst
@@ -1,6 +1,5 @@
MSVC14
------
-``True`` when using Microsoft Visual C++ 14.0.
-
-Set to ``true`` when the compiler is version 14.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v140`` toolset
+(``cl`` version 19) or another compiler that simulates it.
diff --git a/Help/variable/MSVC80.rst b/Help/variable/MSVC80.rst
index b17777c..0d33e82 100644
--- a/Help/variable/MSVC80.rst
+++ b/Help/variable/MSVC80.rst
@@ -1,6 +1,5 @@
MSVC80
------
-``True`` when using Microsoft Visual C++ 8.0.
-
-Set to ``true`` when the compiler is version 8.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v80`` toolset
+(``cl`` version 14) or another compiler that simulates it.
diff --git a/Help/variable/MSVC90.rst b/Help/variable/MSVC90.rst
index 7162d6c..1716e6f 100644
--- a/Help/variable/MSVC90.rst
+++ b/Help/variable/MSVC90.rst
@@ -1,6 +1,5 @@
MSVC90
------
-``True`` when using Microsoft Visual C++ 9.0.
-
-Set to ``true`` when the compiler is version 9.0 of Microsoft Visual C++.
+``True`` when using the Microsoft Visual Studio ``v90`` toolset
+(``cl`` version 15) or another compiler that simulates it.
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 819feb1..ab87d67 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -350,16 +350,22 @@ std::string const& cmGlobalVisualStudio10Generator::GetMSBuildCommand()
std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand()
{
std::string msbuild;
- std::string mskey =
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\";
+ std::string mskey;
+
+ // Search in standard location.
+ mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\";
mskey += this->GetToolsVersion();
mskey += ";MSBuildToolsPath";
if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild,
cmSystemTools::KeyWOW64_32)) {
cmSystemTools::ConvertToUnixSlashes(msbuild);
- msbuild += "/";
+ msbuild += "/MSBuild.exe";
+ if (cmSystemTools::FileExists(msbuild, true)) {
+ return msbuild;
+ }
}
- msbuild += "MSBuild.exe";
+
+ msbuild = "MSBuild.exe";
return msbuild;
}
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;
}