summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-08 13:36:54 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-08 13:36:54 (GMT)
commit988b3806b6ad2f28ebd6b582ce18928407d0b011 (patch)
tree8445c3bf6d14c67665ee12e0da325b0756665c13
parent04657ee2f83cb446c5595090f256273a23be94a2 (diff)
parentbdc679a8aee4e6b9a8aea795bdbda2341d1e5d08 (diff)
downloadCMake-988b3806b6ad2f28ebd6b582ce18928407d0b011.zip
CMake-988b3806b6ad2f28ebd6b582ce18928407d0b011.tar.gz
CMake-988b3806b6ad2f28ebd6b582ce18928407d0b011.tar.bz2
Merge topic 'vs-15-generator'
bdc679a8 VS15: Add Visual Studio 15 generator a8936656 VS: Update v140 flag tables from VS 15 MSBuild files 21346d3f Features: Record features for VS 15 Preview 4
-rw-r--r--Help/generator/Visual Studio 15.rst16
-rw-r--r--Help/manual/cmake-generators.7.rst1
-rw-r--r--Help/release/dev/vs-15-generator.rst4
-rw-r--r--Help/variable/MSVC_VERSION.rst2
-rw-r--r--Modules/Compiler/MSVC-CXX-FeatureTests.cmake3
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx14
-rw-r--r--Source/cmGlobalVisualStudio15Generator.cxx151
-rw-r--r--Source/cmGlobalVisualStudio15Generator.h46
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx12
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h3
-rw-r--r--Source/cmVS14CLFlagTable.h12
-rw-r--r--Source/cmVS14LinkFlagTable.h17
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx1
-rw-r--r--Source/cmake.cxx3
-rwxr-xr-xSource/cmparseMSBuildXML.py3
-rw-r--r--Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake4
-rw-r--r--Tests/VSExternalInclude/CMakeLists.txt4
19 files changed, 290 insertions, 12 deletions
diff --git a/Help/generator/Visual Studio 15.rst b/Help/generator/Visual Studio 15.rst
new file mode 100644
index 0000000..2b9e33a
--- /dev/null
+++ b/Help/generator/Visual Studio 15.rst
@@ -0,0 +1,16 @@
+Visual Studio 15
+----------------
+
+Generates Visual Studio 15 project files.
+
+The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
+to specify a target platform name.
+
+For compatibility with CMake versions prior to 3.1, one may specify
+a target platform name optionally at the end of this generator name:
+
+``Visual Studio 15 Win64``
+ Specify target platform ``x64``.
+
+``Visual Studio 15 ARM``
+ Specify target platform ``ARM``.
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index cde8de8..3df3a81 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -82,6 +82,7 @@ Visual Studio Generators
/generator/Visual Studio 11 2012
/generator/Visual Studio 12 2013
/generator/Visual Studio 14 2015
+ /generator/Visual Studio 15
Other Generators
^^^^^^^^^^^^^^^^
diff --git a/Help/release/dev/vs-15-generator.rst b/Help/release/dev/vs-15-generator.rst
new file mode 100644
index 0000000..be40cbc
--- /dev/null
+++ b/Help/release/dev/vs-15-generator.rst
@@ -0,0 +1,4 @@
+vs-15-generator
+---------------
+
+* The :generator:`Visual Studio 15` generator was added.
diff --git a/Help/variable/MSVC_VERSION.rst b/Help/variable/MSVC_VERSION.rst
index ef3b0b5..e2aff3c9 100644
--- a/Help/variable/MSVC_VERSION.rst
+++ b/Help/variable/MSVC_VERSION.rst
@@ -13,4 +13,4 @@ Known version numbers are::
1600 = VS 10.0
1700 = VS 11.0
1800 = VS 12.0
- 1900 = VS 14.0
+ 1900 = VS 14.0, 15.0
diff --git a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
index 79d5962..5969586 100644
--- a/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/MSVC-CXX-FeatureTests.cmake
@@ -9,6 +9,9 @@
set(_cmake_oldestSupported "_MSC_VER >= 1600")
+# VS version 15 (not 2015) introduces support for aggregate initializers.
+set(_cmake_feature_test_cxx_aggregate_default_initializers "_MSC_FULL_VER >= 190024406")
+
# VS 2015 Update 2 introduces support for variable templates.
# https://www.visualstudio.com/en-us/news/vs2015-update2-vs.aspx
set(_cmake_feature_test_cxx_variable_templates "_MSC_FULL_VER >= 190023918")
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 6c3ebf5..f5c2e52 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -492,6 +492,8 @@ if (WIN32)
cmGlobalVisualStudio12Generator.cxx
cmGlobalVisualStudio14Generator.h
cmGlobalVisualStudio14Generator.cxx
+ cmGlobalVisualStudio15Generator.h
+ cmGlobalVisualStudio15Generator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmIDEFlagTable.h
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index ab87d67..8bb43ee 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -365,6 +365,20 @@ std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand()
}
}
+ // Search where VS15Preview places it.
+ mskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;";
+ mskey += this->GetIDEVersion();
+ if (cmSystemTools::ReadRegistryValue(mskey.c_str(), msbuild,
+ cmSystemTools::KeyWOW64_32)) {
+ cmSystemTools::ConvertToUnixSlashes(msbuild);
+ msbuild += "/MSBuild/";
+ msbuild += this->GetIDEVersion();
+ msbuild += "/Bin/MSBuild.exe";
+ if (cmSystemTools::FileExists(msbuild, true)) {
+ return msbuild;
+ }
+ }
+
msbuild = "MSBuild.exe";
return msbuild;
}
diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx
new file mode 100644
index 0000000..98076c3
--- /dev/null
+++ b/Source/cmGlobalVisualStudio15Generator.cxx
@@ -0,0 +1,151 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2016 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio15Generator.h"
+
+#include "cmAlgorithms.h"
+#include "cmLocalVisualStudio10Generator.h"
+#include "cmMakefile.h"
+
+static const char vs15generatorName[] = "Visual Studio 15";
+
+// 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) {
+ return 0;
+ }
+ const char* p = name.c_str() + sizeof(vs15generatorName) - 1;
+ genName = std::string(vs15generatorName) + p;
+ return p;
+}
+
+class cmGlobalVisualStudio15Generator::Factory
+ : public cmGlobalGeneratorFactory
+{
+public:
+ virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+ cmake* cm) const
+ {
+ std::string genName;
+ const char* p = cmVS15GenName(name, genName);
+ if (!p) {
+ return 0;
+ }
+ if (!*p) {
+ return new cmGlobalVisualStudio15Generator(cm, genName, "");
+ }
+ if (*p++ != ' ') {
+ return 0;
+ }
+ if (strcmp(p, "Win64") == 0) {
+ return new cmGlobalVisualStudio15Generator(cm, genName, "x64");
+ }
+ if (strcmp(p, "ARM") == 0) {
+ return new cmGlobalVisualStudio15Generator(cm, genName, "ARM");
+ }
+ return 0;
+ }
+
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const
+ {
+ entry.Name = std::string(vs15generatorName) + " [arch]";
+ entry.Brief = "Generates Visual Studio 15 project files. "
+ "Optional [arch] can be \"Win64\" or \"ARM\".";
+ }
+
+ virtual void GetGenerators(std::vector<std::string>& names) const
+ {
+ names.push_back(vs15generatorName);
+ names.push_back(vs15generatorName + std::string(" ARM"));
+ names.push_back(vs15generatorName + std::string(" Win64"));
+ }
+
+ bool SupportsToolset() const CM_OVERRIDE { return true; }
+ bool SupportsPlatform() const CM_OVERRIDE { return true; }
+};
+
+cmGlobalGeneratorFactory* cmGlobalVisualStudio15Generator::NewFactory()
+{
+ return new Factory;
+}
+
+cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator(
+ cmake* cm, const std::string& name, const std::string& platformName)
+ : cmGlobalVisualStudio14Generator(cm, name, platformName)
+{
+ std::string vc15Express;
+ this->ExpressEdition = cmSystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\15.0\\Setup\\VC;"
+ "ProductDir",
+ vc15Express, cmSystemTools::KeyWOW64_32);
+ this->DefaultPlatformToolset = "v140";
+ this->Version = VS15;
+}
+
+bool cmGlobalVisualStudio15Generator::MatchesGeneratorName(
+ const std::string& name) const
+{
+ std::string genName;
+ if (cmVS15GenName(name, genName)) {
+ return genName == this->GetName();
+ }
+ return false;
+}
+
+void cmGlobalVisualStudio15Generator::WriteSLNHeader(std::ostream& fout)
+{
+ // Visual Studio 15 writes .sln format 12.00
+ fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+ if (this->ExpressEdition) {
+ fout << "# Visual Studio Express 15 for Windows Desktop\n";
+ } else {
+ fout << "# Visual Studio 15\n";
+ }
+}
+
+bool cmGlobalVisualStudio15Generator::SelectWindowsStoreToolset(
+ std::string& toolset) const
+{
+ if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) {
+ if (this->IsWindowsStoreToolsetInstalled() &&
+ this->IsWindowsDesktopToolsetInstalled()) {
+ toolset = "v140"; // VS 15 uses v140 toolset
+ return true;
+ } else {
+ return false;
+ }
+ }
+ return this->cmGlobalVisualStudio14Generator::SelectWindowsStoreToolset(
+ toolset);
+}
+
+bool cmGlobalVisualStudio15Generator::IsWindowsDesktopToolsetInstalled() const
+{
+ const char desktop10Key[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
+ "VisualStudio\\15.0\\VC\\Runtimes";
+
+ std::vector<std::string> vc15;
+ return cmSystemTools::GetRegistrySubKeys(desktop10Key, vc15,
+ cmSystemTools::KeyWOW64_32);
+}
+
+bool cmGlobalVisualStudio15Generator::IsWindowsStoreToolsetInstalled() const
+{
+ const char universal10Key[] =
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
+ "VisualStudio\\15.0\\Setup\\Build Tools for Windows 10;SrcPath";
+
+ std::string win10SDK;
+ return cmSystemTools::ReadRegistryValue(universal10Key, win10SDK,
+ cmSystemTools::KeyWOW64_32);
+}
diff --git a/Source/cmGlobalVisualStudio15Generator.h b/Source/cmGlobalVisualStudio15Generator.h
new file mode 100644
index 0000000..f673883
--- /dev/null
+++ b/Source/cmGlobalVisualStudio15Generator.h
@@ -0,0 +1,46 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2016 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio15Generator_h
+#define cmGlobalVisualStudio15Generator_h
+
+#include "cmGlobalVisualStudio14Generator.h"
+
+/** \class cmGlobalVisualStudio15Generator */
+class cmGlobalVisualStudio15Generator : public cmGlobalVisualStudio14Generator
+{
+public:
+ cmGlobalVisualStudio15Generator(cmake* cm, const std::string& name,
+ const std::string& platformName);
+ static cmGlobalGeneratorFactory* NewFactory();
+
+ virtual bool MatchesGeneratorName(const std::string& name) const;
+
+ virtual void WriteSLNHeader(std::ostream& fout);
+
+ virtual const char* GetToolsVersion() { return "15.0"; }
+protected:
+ virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
+
+ virtual const char* GetIDEVersion() { return "15.0"; }
+
+ // Used to verify that the Desktop toolset for the current generator is
+ // installed on the machine.
+ virtual bool IsWindowsDesktopToolsetInstalled() const;
+
+ // These aren't virtual because we need to check if the selected version
+ // of the toolset is installed
+ bool IsWindowsStoreToolsetInstalled() const;
+
+private:
+ class Factory;
+};
+#endif
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 8d3964f..0dc4497 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -163,6 +163,18 @@ std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand()
}
}
+ // Search where VS15Preview places it.
+ vskey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;";
+ vskey += this->GetIDEVersion();
+ if (cmSystemTools::ReadRegistryValue(vskey.c_str(), vscmd,
+ cmSystemTools::KeyWOW64_32)) {
+ cmSystemTools::ConvertToUnixSlashes(vscmd);
+ vscmd += "/Common7/IDE/devenv.com";
+ if (cmSystemTools::FileExists(vscmd, true)) {
+ return vscmd;
+ }
+ }
+
vscmd = "devenv.com";
return vscmd;
}
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 1d456ff..3312ed6 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -34,7 +34,8 @@ public:
VS11 = 110,
VS12 = 120,
/* VS13 = 130 was skipped */
- VS14 = 140
+ VS14 = 140,
+ VS15 = 150
};
cmGlobalVisualStudioGenerator(cmake* cm);
diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS14CLFlagTable.h
index 5812e79..c48db68 100644
--- a/Source/cmVS14CLFlagTable.h
+++ b/Source/cmVS14CLFlagTable.h
@@ -60,6 +60,9 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {
{ "BufferSecurityCheck", "GS-", "Disable Security Check", "false", 0 },
{ "BufferSecurityCheck", "GS", "Enable Security Check", "true", 0 },
+ { "ControlFlowGuard", "guard:cf", "Yes", "Guard", 0 },
+ { "ControlFlowGuard", "", "No", "false", 0 },
+
{ "EnableEnhancedInstructionSet", "arch:SSE", "Streaming SIMD Extensions",
"StreamingSIMDExtensions", 0 },
{ "EnableEnhancedInstructionSet", "arch:SSE2", "Streaming SIMD Extensions 2",
@@ -76,6 +79,10 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {
{ "FloatingPointModel", "fp:strict", "Strict", "Strict", 0 },
{ "FloatingPointModel", "fp:fast", "Fast", "Fast", 0 },
+ { "LanguageStandard", "std:c++14", "ISO C++14 Standard", "stdcpp14", 0 },
+ { "LanguageStandard", "std:c++latest", "ISO C++ Latest Draft Standard",
+ "stdcpplatest", 0 },
+
{ "PrecompiledHeader", "Yc", "Create", "Create",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue },
{ "PrecompiledHeader", "Yu", "Use", "Use",
@@ -164,6 +171,9 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {
{ "TreatWChar_tAsBuiltInType", "Zc:wchar_t", "", "true", 0 },
{ "ForceConformanceInForLoopScope", "Zc:forScope-", "", "false", 0 },
{ "ForceConformanceInForLoopScope", "Zc:forScope", "", "true", 0 },
+ { "RemoveUnreferencedCodeData", "Zc:inline", "", "true", 0 },
+ { "EnforceTypeConversionRules", "Zc:rvalueCast-", "", "false", 0 },
+ { "EnforceTypeConversionRules", "Zc:rvalueCast", "", "true", 0 },
{ "RuntimeTypeInfo", "GR-", "", "false", 0 },
{ "RuntimeTypeInfo", "GR", "", "true", 0 },
{ "OpenMPSupport", "openmp-", "", "false", 0 },
@@ -215,6 +225,8 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// String Properties
+ { "WarningVersion", "Wv:", "Warning Version", "",
+ cmVS7FlagTable::UserValue },
// Skip [TrackerLogDirectory] - no command line Switch.
{ "PreprocessOutputPath", "Fi", "Preprocess Output Path", "",
cmVS7FlagTable::UserValue },
diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS14LinkFlagTable.h
index 6e56422..596f880 100644
--- a/Source/cmVS14LinkFlagTable.h
+++ b/Source/cmVS14LinkFlagTable.h
@@ -35,6 +35,12 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "UACExecutionLevel", "level='requireAdministrator'",
"requireAdministrator", "RequireAdministrator", 0 },
+ { "GenerateDebugInformation", "DEBUG:FASTLINK",
+ "Optimize for faster linking", "DebugFastLink",
+ cmVS7FlagTable::CaseInsensitive },
+ { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug",
+ cmVS7FlagTable::CaseInsensitive },
+
{ "SubSystem", "", "Not Set", "NotSet", 0 },
{ "SubSystem", "SUBSYSTEM:CONSOLE", "Console", "Console", 0 },
{ "SubSystem", "SUBSYSTEM:WINDOWS", "Windows", "Windows", 0 },
@@ -54,6 +60,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "Driver", "DRIVER:WDM", "WDM", "WDM", 0 },
{ "LinkTimeCodeGeneration", "", "Default", "Default", 0 },
+ { "LinkTimeCodeGeneration", "LTCG:incremental",
+ "Use Fast Link Time Code Generation", "UseFastLinkTimeCodeGeneration", 0 },
{ "LinkTimeCodeGeneration", "LTCG", "Use Link Time Code Generation",
"UseLinkTimeCodeGeneration", 0 },
{ "LinkTimeCodeGeneration", "LTCG:PGInstrument",
@@ -121,6 +129,9 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "CLRSupportLastError", "CLRSupportLastError:SYSTEMDLL", "System Dlls Only",
"SystemDlls", 0 },
+ { "LinkControlFlowGuard", "guard:cf", "Enable Security Check with Guard",
+ "Guard", 0 },
+
// Bool Properties
{ "LinkIncremental", "INCREMENTAL:NO", "", "false", 0 },
{ "LinkIncremental", "INCREMENTAL", "", "true", 0 },
@@ -138,10 +149,6 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "UACUIAccess", "uiAccess='false'", "", "false", 0 },
{ "UACUIAccess", "uiAccess='true'", "", "true", 0 },
{ "ManifestEmbed", "manifest:embed", "", "true", 0 },
- { "GenerateDebugInformation", "DEBUG:FASTLINK", "", "DebugFastLink",
- cmVS7FlagTable::CaseInsensitive },
- { "GenerateDebugInformation", "DEBUG", "", "Debug",
- cmVS7FlagTable::CaseInsensitive },
{ "MapExports", "MAPINFO:EXPORTS", "", "true", 0 },
{ "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 },
{ "AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0 },
@@ -195,6 +202,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "AdditionalLibraryDirectories", "LIBPATH:",
"Additional Library Directories", "",
cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
+ { "Natvis", "NATVIS:", "Natvis files", "",
+ cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable },
// Skip [AdditionalDependencies] - no command line Switch.
{ "IgnoreSpecificDefaultLibraries", "NODEFAULTLIB:",
"Ignore Specific Default Libraries", "",
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 3b31d7b..9badda6 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -96,6 +96,7 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault()
case cmGlobalVisualStudioGenerator::VS11:
case cmGlobalVisualStudioGenerator::VS12:
case cmGlobalVisualStudioGenerator::VS14:
+ case cmGlobalVisualStudioGenerator::VS15:
// by default VS puts <ExceptionHandling></ExceptionHandling> empty
// for a project, to make our projects look the same put a new line
// and space over for the closing </ExceptionHandling> as the default
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 25f9e3a..d6bea3d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -66,6 +66,7 @@
#include "cmGlobalVisualStudio11Generator.h"
#include "cmGlobalVisualStudio12Generator.h"
#include "cmGlobalVisualStudio14Generator.h"
+#include "cmGlobalVisualStudio15Generator.h"
#include "cmGlobalVisualStudio71Generator.h"
#include "cmGlobalVisualStudio8Generator.h"
#include "cmGlobalVisualStudio9Generator.h"
@@ -1317,6 +1318,7 @@ int cmake::ActualConfigure()
{ "11.0", "Visual Studio 11 2012" },
{ "12.0", "Visual Studio 12 2013" },
{ "14.0", "Visual Studio 14 2015" },
+ { "15.0", "Visual Studio 15" },
{ 0, 0 }
};
for (int i = 0; version[i].MSVersion != 0; i++) {
@@ -1634,6 +1636,7 @@ void cmake::AddDefaultGenerators()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
#if !defined(CMAKE_BOOT_MINGW)
+ this->Generators.push_back(cmGlobalVisualStudio15Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio14Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio12Generator::NewFactory());
this->Generators.push_back(cmGlobalVisualStudio11Generator::NewFactory());
diff --git a/Source/cmparseMSBuildXML.py b/Source/cmparseMSBuildXML.py
index 056a0db..1b38d15 100755
--- a/Source/cmparseMSBuildXML.py
+++ b/Source/cmparseMSBuildXML.py
@@ -15,6 +15,9 @@
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/cl.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/lib.xml"
# "${PROGRAMFILES}/MSBuild/Microsoft.Cpp/v4.0/V140/1033/link.xml"
+# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/cl.xml"
+# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/lib.xml"
+# "${PROGRAMFILES}/Microsoft Visual Studio/VS15Preview/Common7/IDE/VC/VCTargets/1033/link.xml"
#
# BoolProperty <Name>true|false</Name>
# simple example:
diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
index 4d0a0a1..27250cb 100644
--- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
set(RunCMake_GENERATOR_PLATFORM "")
run_cmake(NoPlatform)
-if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$")
+if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$")
set(RunCMake_GENERATOR_PLATFORM "x64")
run_cmake(x64Platform)
else()
@@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -A "Extra Platform")
run_cmake(TwoPlatforms)
unset(RunCMake_TEST_OPTIONS)
-if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[0124])( 20[0-9][0-9])?$")
+if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio ([89]|1[01245])( 20[0-9][0-9])?$")
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestPlatform-toolchain.cmake)
run_cmake(TestPlatformToolchain)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
index 6220657..283a2a0 100644
--- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
set(RunCMake_GENERATOR_TOOLSET "")
run_cmake(NoToolset)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3)
set(RunCMake_GENERATOR_TOOLSET "Test Toolset")
run_cmake(TestToolset)
else()
@@ -17,7 +17,7 @@ set(RunCMake_TEST_OPTIONS -T "Extra Toolset")
run_cmake(TwoToolsets)
unset(RunCMake_TEST_OPTIONS)
-if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[0124]|Xcode" AND NOT XCODE_BELOW_3)
+if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[01245]|Xcode" AND NOT XCODE_BELOW_3)
set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake)
run_cmake(TestToolsetToolchain)
unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt
index 20301c2..7465243 100644
--- a/Tests/VSExternalInclude/CMakeLists.txt
+++ b/Tests/VSExternalInclude/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.6)
project(VSExternalInclude)
-if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124]")
+if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01245]")
set(PROJECT_EXT vcxproj)
else()
set(PROJECT_EXT vcproj)
@@ -55,7 +55,7 @@ add_dependencies(VSExternalInclude lib2)
# and the sln file can no longer be the only source
# of that depend. So, for VS 10 make the executable
# depend on lib1 and lib2
-if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[0124]")
+if(${CMAKE_GENERATOR} MATCHES "Visual Studio 1[01245]")
add_dependencies(VSExternalInclude lib1)
endif()