Attached Files | VS2013.patch [^] (12,562 bytes) 2013-06-28 06:51 [Show Content] [Hide Content]diff -r f07c8ebeb515 -r 636b485f250b Modules/CMakeVS12FindMake.cmake
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Modules/CMakeVS12FindMake.cmake Fri Jun 28 18:48:32 2013 +0800
@@ -0,0 +1,53 @@
+
+#=============================================================================
+# Copyright 2007-2011 Kitware, Inc.
+#
+# 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.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Look for devenv as a build program. We need to use this to support
+# Intel Fortran integration into VS. MSBuild can not be used for that case
+# since Intel Fortran uses the older devenv file format.
+find_program(CMAKE_MAKE_PROGRAM
+ NAMES devenv
+ HINTS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VS;EnvironmentDirectory]
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup;Dbghelp_path]
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 12.0/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio12.0/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 12/Common7/IDE"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio12/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 12.0/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio12.0/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 12/Common7/IDE"
+ "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio12/Common7/IDE"
+ "/Program Files/Microsoft Visual Studio 12.0/Common7/IDE/"
+ "/Program Files/Microsoft Visual Studio 12/Common7/IDE/"
+ )
+
+# if devenv is not found, then use MSBuild.
+# it is expected that if devenv is not found, then we are
+# dealing with Visual Studio Express.
+if(NOT CMAKE_CROSSCOMPILING)
+ set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]")
+ set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]")
+ find_program(CMAKE_MAKE_PROGRAM
+ NAMES MSBuild
+ HINTS
+ ${_FDIR}/${_FVER}
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VS;ProductDir]
+ "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;CLR Version]/"
+ "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;CLR Version]/"
+ "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\12.0;CLR Version]/")
+endif()
+
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC12 1)
+set(MSVC_VERSION 1800)
diff -r f07c8ebeb515 -r 636b485f250b Source/CMakeLists.txt
--- a/Source/CMakeLists.txt Fri Jun 28 17:19:44 2013 +0800
+++ b/Source/CMakeLists.txt Fri Jun 28 18:48:32 2013 +0800
@@ -345,6 +345,8 @@
cmGlobalVisualStudio10Generator.cxx
cmGlobalVisualStudio11Generator.h
cmGlobalVisualStudio11Generator.cxx
+ cmGlobalVisualStudio12Generator.h
+ cmGlobalVisualStudio12Generator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
diff -r f07c8ebeb515 -r 636b485f250b Source/cmDocumentVariables.cxx
--- a/Source/cmDocumentVariables.cxx Fri Jun 28 17:19:44 2013 +0800
+++ b/Source/cmDocumentVariables.cxx Fri Jun 28 18:48:32 2013 +0800
@@ -1069,6 +1069,7 @@
" 1500 = VS 9.0\n"
" 1600 = VS 10.0\n"
" 1700 = VS 11.0\n"
+ " 1800 = VS 12.0\n"
"",
false,
"Variables That Describe the System");
diff -r f07c8ebeb515 -r 636b485f250b Source/cmGlobalVisualStudio12Generator.cxx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/cmGlobalVisualStudio12Generator.cxx Fri Jun 28 18:48:32 2013 +0800
@@ -0,0 +1,111 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 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 "cmGlobalVisualStudio12Generator.h"
+#include "cmLocalVisualStudio10Generator.h"
+#include "cmMakefile.h"
+
+static const char vs12Win32generatorName[] = "Visual Studio 2013";
+static const char vs12Win64generatorName[] = "Visual Studio 2013 Win64";
+static const char vs12ARMgeneratorName[] = "Visual Studio 2013 ARM";
+
+class cmGlobalVisualStudio12Generator::Factory
+ : public cmGlobalGeneratorFactory
+{
+public:
+ virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
+ if(!strcmp(name, vs12Win32generatorName))
+ {
+ return new cmGlobalVisualStudio12Generator(
+ vs12Win32generatorName, NULL, NULL);
+ }
+ if(!strcmp(name, vs12Win64generatorName))
+ {
+ return new cmGlobalVisualStudio12Generator(
+ vs12Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
+ }
+ if(!strcmp(name, vs12ARMgeneratorName))
+ {
+ return new cmGlobalVisualStudio12Generator(
+ vs12ARMgeneratorName, "ARM", NULL);
+ }
+ return 0;
+ }
+
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const {
+ entry.Name = "Visual Studio 2013";
+ entry.Brief = "Generates Visual Studio 2013 project files.";
+ entry.Full =
+ "It is possible to append a space followed by the platform name "
+ "to create project files for a specific target platform. E.g. "
+ "\"Visual Studio 2013 Win64\" will create project files for "
+ "the x64 processor; \"Visual Studio 2013 ARM\" for ARM.";
+ }
+
+ virtual void GetGenerators(std::vector<std::string>& names) const {
+ names.push_back(vs12Win32generatorName);
+ names.push_back(vs12Win64generatorName);
+ names.push_back(vs12ARMgeneratorName); }
+};
+
+//----------------------------------------------------------------------------
+cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
+{
+ return new Factory;
+}
+
+//----------------------------------------------------------------------------
+cmGlobalVisualStudio12Generator::cmGlobalVisualStudio12Generator(
+ const char* name, const char* architectureId,
+ const char* additionalPlatformDefinition)
+ : cmGlobalVisualStudio11Generator(name, architectureId,
+ additionalPlatformDefinition)
+{
+ this->FindMakeProgramFile = "CMakeVS12FindMake.cmake";
+ std::string vc12Express;
+ this->ExpressEdition = cmSystemTools::ReadRegistryValue(
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\12.0\\Setup\\VC;"
+ "ProductDir", vc12Express, cmSystemTools::KeyWOW64_32);
+ this->PlatformToolset = "v120";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio12Generator::WriteSLNHeader(std::ostream& fout)
+{
+ fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+ if (this->ExpressEdition)
+ {
+ fout << "# Visual Studio Express 2013 for Windows Desktop\n";
+ }
+ else
+ {
+ fout << "# Visual Studio 2013\n";
+ }
+}
+
+//----------------------------------------------------------------------------
+cmLocalGenerator *cmGlobalVisualStudio12Generator::CreateLocalGenerator()
+{
+ cmLocalVisualStudio10Generator* lg =
+ new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS12);
+ lg->SetPlatformName(this->GetPlatformName());
+ lg->SetGlobalGenerator(this);
+ return lg;
+}
+
+//----------------------------------------------------------------------------
+bool cmGlobalVisualStudio12Generator::UseFolderProperty()
+{
+ // Intentionally skip over the parent class implementation and call the
+ // grand-parent class's implementation. Folders are not supported by the
+ // Express editions in VS10 and earlier, but they are in VS12 Express.
+ return cmGlobalVisualStudio8Generator::UseFolderProperty();
+}
diff -r f07c8ebeb515 -r 636b485f250b Source/cmGlobalVisualStudio12Generator.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Source/cmGlobalVisualStudio12Generator.h Fri Jun 28 18:48:32 2013 +0800
@@ -0,0 +1,40 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 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 cmGlobalVisualStudio12Generator_h
+#define cmGlobalVisualStudio12Generator_h
+
+#include "cmGlobalVisualStudio11Generator.h"
+
+
+/** \class cmGlobalVisualStudio12Generator */
+class cmGlobalVisualStudio12Generator:
+ public cmGlobalVisualStudio11Generator
+{
+public:
+ cmGlobalVisualStudio12Generator(const char* name,
+ const char* architectureId, const char* additionalPlatformDefinition);
+ static cmGlobalGeneratorFactory* NewFactory();
+
+ virtual void WriteSLNHeader(std::ostream& fout);
+
+ ///! create the correct local generator
+ virtual cmLocalGenerator *CreateLocalGenerator();
+
+ /** TODO: VS 12 user macro support. */
+ virtual std::string GetUserMacrosDirectory() { return ""; }
+protected:
+ virtual const char* GetIDEVersion() { return "12.0"; }
+ bool UseFolderProperty();
+private:
+ class Factory;
+};
+#endif
diff -r f07c8ebeb515 -r 636b485f250b Source/cmLocalVisualStudioGenerator.h
--- a/Source/cmLocalVisualStudioGenerator.h Fri Jun 28 17:19:44 2013 +0800
+++ b/Source/cmLocalVisualStudioGenerator.h Fri Jun 28 18:48:32 2013 +0800
@@ -38,7 +38,8 @@
VS8 = 80,
VS9 = 90,
VS10 = 100,
- VS11 = 110
+ VS11 = 110,
+ VS12 = 120
};
cmLocalVisualStudioGenerator(VSVersion v);
diff -r f07c8ebeb515 -r 636b485f250b Source/cmVisualStudioGeneratorOptions.cxx
--- a/Source/cmVisualStudioGeneratorOptions.cxx Fri Jun 28 17:19:44 2013 +0800
+++ b/Source/cmVisualStudioGeneratorOptions.cxx Fri Jun 28 18:48:32 2013 +0800
@@ -66,6 +66,7 @@
break;
case cmLocalVisualStudioGenerator::VS10:
case cmLocalVisualStudioGenerator::VS11:
+ case cmLocalVisualStudioGenerator::VS12:
// 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 -r f07c8ebeb515 -r 636b485f250b Source/cmake.cxx
--- a/Source/cmake.cxx Fri Jun 28 17:19:44 2013 +0800
+++ b/Source/cmake.cxx Fri Jun 28 18:48:32 2013 +0800
@@ -65,6 +65,7 @@
# include "cmGlobalVisualStudio9Generator.h"
# include "cmGlobalVisualStudio10Generator.h"
# include "cmGlobalVisualStudio11Generator.h"
+# include "cmGlobalVisualStudio12Generator.h"
# include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
# include "cmGlobalJOMMakefileGenerator.h"
@@ -2244,6 +2245,7 @@
{"9.0", "Visual Studio 9 2008"},
{"10.0", "Visual Studio 10"},
{"11.0", "Visual Studio 11"},
+ {"12.0", "Visual Studio 2013"},
{0, 0}};
for(int i=0; version[i].MSVersion != 0; i++)
{
@@ -2653,6 +2655,8 @@
this->Generators.push_back(
cmGlobalVisualStudio11Generator::NewFactory());
this->Generators.push_back(
+ cmGlobalVisualStudio12Generator::NewFactory());
+ this->Generators.push_back(
cmGlobalVisualStudio71Generator::NewFactory());
this->Generators.push_back(
cmGlobalVisualStudio8Generator::NewFactory());
|