summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio15Generator.cxx
diff options
context:
space:
mode:
authorRoman Wüger <roman.wueger@gmx.at>2016-11-29 12:50:21 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-29 15:46:36 (GMT)
commitd639620e14cb25a3bc8039bc2a50bf402b8d2f79 (patch)
tree537da46669de85e06c3befb981a26cb4faba4fa6 /Source/cmGlobalVisualStudio15Generator.cxx
parent37966a57992a8a2cc59fd663a4dea985a0be248c (diff)
downloadCMake-d639620e14cb25a3bc8039bc2a50bf402b8d2f79.zip
CMake-d639620e14cb25a3bc8039bc2a50bf402b8d2f79.tar.gz
CMake-d639620e14cb25a3bc8039bc2a50bf402b8d2f79.tar.bz2
VS: Rename VS 15 generator to 'Visual Studio 15 2017'
The final name of this VS version was announced: https://blogs.msdn.microsoft.com/visualstudio/2016/11/16/visual-studio-2017-rc/ Add the year to the generator name accordingly. For convenience, map the name without the year to the name with the year.
Diffstat (limited to 'Source/cmGlobalVisualStudio15Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio15Generator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx
index a833a5f..0c6beb2 100644
--- a/Source/cmGlobalVisualStudio15Generator.cxx
+++ b/Source/cmGlobalVisualStudio15Generator.cxx
@@ -6,16 +6,19 @@
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
-static const char vs15generatorName[] = "Visual Studio 15";
+static const char vs15generatorName[] = "Visual Studio 15 2017";
// Map generator name without year to name with year.
static const char* cmVS15GenName(const std::string& name, std::string& genName)
{
if (strncmp(name.c_str(), vs15generatorName,
- sizeof(vs15generatorName) - 1) != 0) {
+ sizeof(vs15generatorName) - 6) != 0) {
return 0;
}
- const char* p = name.c_str() + sizeof(vs15generatorName) - 1;
+ const char* p = name.c_str() + sizeof(vs15generatorName) - 6;
+ if (cmHasLiteralPrefix(p, " 2017")) {
+ p += 5;
+ }
genName = std::string(vs15generatorName) + p;
return p;
}
@@ -50,7 +53,7 @@ public:
virtual void GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = std::string(vs15generatorName) + " [arch]";
- entry.Brief = "Generates Visual Studio 15 project files. "
+ entry.Brief = "Generates Visual Studio 2017 project files. "
"Optional [arch] can be \"Win64\" or \"ARM\".";
}