[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-648-g678e142
Brad King
brad.king at kitware.com
Fri Nov 14 14:24:46 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 678e142e233acd0ce2106f44f6d33fa27842abe8 (commit)
via f5afb90d7c0ff756dedc3d473c0fb60dee004d82 (commit)
from 41d742d270e26f75fe45b7286d44740673c2c41a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=678e142e233acd0ce2106f44f6d33fa27842abe8
commit 678e142e233acd0ce2106f44f6d33fa27842abe8
Merge: 41d742d f5afb90
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 14:24:44 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 14 14:24:44 2014 -0500
Merge topic 'vs14-is-2015' into next
f5afb90d VS: Rename VS 14 generator to 'Visual Studio 14 2015'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5afb90d7c0ff756dedc3d473c0fb60dee004d82
commit f5afb90d7c0ff756dedc3d473c0fb60dee004d82
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 14:21:50 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 14 14:23:36 2014 -0500
VS: Rename VS 14 generator to 'Visual Studio 14 2015'
Now that we know the year component of this VS version we
can add it to the generator name. For convenience, map
the name without the year to the name with the year.
diff --git a/Help/generator/Visual Studio 14.rst b/Help/generator/Visual Studio 14 2015.rst
similarity index 66%
rename from Help/generator/Visual Studio 14.rst
rename to Help/generator/Visual Studio 14 2015.rst
index d621b7e..b35997a 100644
--- a/Help/generator/Visual Studio 14.rst
+++ b/Help/generator/Visual Studio 14 2015.rst
@@ -1,7 +1,7 @@
-Visual Studio 14
-----------------
+Visual Studio 14 2015
+---------------------
-Generates Visual Studio 14 project files.
+Generates Visual Studio 14 (VS 2015) project files.
The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set
to specify a target platform name.
@@ -9,8 +9,8 @@ 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 14 Win64``
+``Visual Studio 14 2015 Win64``
Specify target platform ``x64``.
-``Visual Studio 14 ARM``
+``Visual Studio 14 2015 ARM``
Specify target platform ``ARM``.
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index 4bc8c5f..bda7eef 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -64,7 +64,7 @@ one may launch CMake from any environment.
/generator/Visual Studio 10 2010
/generator/Visual Studio 11 2012
/generator/Visual Studio 12 2013
- /generator/Visual Studio 14
+ /generator/Visual Studio 14 2015
/generator/Xcode
Extra Generators
diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst
index 65aae00..101c29d 100644
--- a/Help/release/3.1.0.rst
+++ b/Help/release/3.1.0.rst
@@ -18,7 +18,7 @@ New Features
Generators
----------
-* A :generator:`Visual Studio 14` generator was added.
+* The :generator:`Visual Studio 14 2015` generator was added.
Windows Phone and Windows Store
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index d001f93..fe702c0 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -13,21 +13,36 @@
#include "cmLocalVisualStudio10Generator.h"
#include "cmMakefile.h"
-static const char vs14generatorName[] = "Visual Studio 14";
+static const char vs14generatorName[] = "Visual Studio 14 2015";
+
+// Map generator name without year to name with year.
+static const char* cmVS14GenName(const std::string& name, std::string& genName)
+{
+ if(strncmp(name.c_str(), vs14generatorName,
+ sizeof(vs14generatorName)-6) != 0)
+ {
+ return 0;
+ }
+ const char* p = name.c_str() + sizeof(vs14generatorName) - 6;
+ if(cmHasLiteralPrefix(p, " 2015"))
+ {
+ p += 5;
+ }
+ genName = std::string(vs14generatorName) + p;
+ return p;
+}
class cmGlobalVisualStudio14Generator::Factory
: public cmGlobalGeneratorFactory
{
public:
virtual cmGlobalGenerator* CreateGlobalGenerator(
- const std::string& genName) const
+ const std::string& name) const
{
- if(strncmp(genName.c_str(), vs14generatorName,
- sizeof(vs14generatorName) - 1) != 0)
- {
- return 0;
- }
- const char* p = genName.c_str() + sizeof(vs14generatorName) - 1;
+ std::string genName;
+ const char* p = cmVS14GenName(name, genName);
+ if(!p)
+ { return 0; }
if(!*p)
{
return new cmGlobalVisualStudio14Generator(
@@ -51,7 +66,7 @@ public:
virtual void GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = vs14generatorName;
- entry.Brief = "Generates Visual Studio 14 project files.";
+ entry.Brief = "Generates Visual Studio 14 (VS 2015) project files.";
}
virtual void GetGenerators(std::vector<std::string>& names) const
@@ -85,7 +100,12 @@ bool
cmGlobalVisualStudio14Generator::MatchesGeneratorName(
const std::string& name) const
{
- return name == this->GetName();
+ std::string genName;
+ if(cmVS14GenName(name, genName))
+ {
+ return genName == this->GetName();
+ }
+ return false;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 09d270d..36a0645 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1403,7 +1403,7 @@ int cmake::ActualConfigure()
{"10.0", "Visual Studio 10 2010"},
{"11.0", "Visual Studio 11 2012"},
{"12.0", "Visual Studio 12 2013"},
- {"14.0", "Visual Studio 14"},
+ {"14.0", "Visual Studio 14 2015"},
{0, 0}};
for(int i=0; version[i].MSVersion != 0; i++)
{
-----------------------------------------------------------------------
Summary of changes:
...ual Studio 14.rst => Visual Studio 14 2015.rst} | 10 ++---
Help/manual/cmake-generators.7.rst | 2 +-
Help/release/3.1.0.rst | 2 +-
Source/cmGlobalVisualStudio14Generator.cxx | 40 +++++++++++++++-----
Source/cmake.cxx | 2 +-
5 files changed, 38 insertions(+), 18 deletions(-)
rename Help/generator/{Visual Studio 14.rst => Visual Studio 14 2015.rst} (66%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list