[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3945-g9367bd4
Robert Maynard
robert.maynard at kitware.com
Tue Aug 20 16:26:28 EDT 2013
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 9367bd4dd10fcc191f68bd21c99c355661937c9f (commit)
via f0cf64ccbbe4c3c34fc93dea06f85cf8dcd77fb9 (commit)
from 90257b817393fec01b03a239904d107cd004543d (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=9367bd4dd10fcc191f68bd21c99c355661937c9f
commit 9367bd4dd10fcc191f68bd21c99c355661937c9f
Merge: 90257b8 f0cf64c
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Aug 20 16:26:27 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 20 16:26:27 2013 -0400
Merge topic 'vs2013_toolset_14369' into next
f0cf64c VS: Each Visual Studio Generator has a tools version.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0cf64ccbbe4c3c34fc93dea06f85cf8dcd77fb9
commit f0cf64ccbbe4c3c34fc93dea06f85cf8dcd77fb9
Author: Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Aug 20 14:59:59 2013 -0400
Commit: Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Aug 20 16:26:05 2013 -0400
VS: Each Visual Studio Generator has a tools version.
The MSBuild version for each visual studio generator isn't 4.0. With Visual
Studo 2013 the ToolsVersion moved from being tied to the .Net Generator and now
has its own version number.
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 0a95091..31e122e 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -81,6 +81,9 @@ public:
void PathTooLong(cmTarget* target, cmSourceFile* sf,
std::string const& sfRel);
+
+ virtual const char* GetToolsVersion() { return "4.0"; }
+
protected:
virtual const char* GetIDEVersion() { return "10.0"; }
diff --git a/Source/cmGlobalVisualStudio12Generator.h b/Source/cmGlobalVisualStudio12Generator.h
index 064e310..8c8aeb1 100644
--- a/Source/cmGlobalVisualStudio12Generator.h
+++ b/Source/cmGlobalVisualStudio12Generator.h
@@ -31,6 +31,11 @@ public:
/** TODO: VS 12 user macro support. */
virtual std::string GetUserMacrosDirectory() { return ""; }
+
+ //in Visual Studio 2013 they detached the MSBuild tools version
+ //from the .Net Framework version and instead made it have it's own
+ //version number
+ virtual const char* GetToolsVersion() { return "12.0"; }
protected:
virtual const char* GetIDEVersion() { return "12.0"; }
private:
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ea05347..effe966 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -216,12 +216,15 @@ void cmVisualStudio10TargetGenerator::Generate()
// Write the encoding header into the file
char magic[] = {0xEF,0xBB, 0xBF};
this->BuildFileStream->write(magic, 3);
- this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",0);
- this->WriteString("<Project DefaultTargets=\"Build\" "
- "ToolsVersion=\"4.0\" "
- "xmlns=\"http://schemas.microsoft.com/"
- "developer/msbuild/2003\">\n",
- 0);
+
+ //get the tools version to use
+ const std::string toolsVer(this->GlobalGenerator->GetToolsVersion());
+ std::string project_defaults = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ project_defaults.append("<Project DefaultTargets=\"Build\" ToolsVersion=\"");
+ project_defaults.append(toolsVer +" \" ");
+ project_defaults.append("xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n");
+ this->WriteString(project_defaults.c_str(),0);
+
this->WriteProjectConfigurations();
this->WriteString("<PropertyGroup Label=\"Globals\">\n", 1);
this->WriteString("<ProjectGUID>", 2);
@@ -716,12 +719,15 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
fout.write(magic, 3);
cmGeneratedFileStream* save = this->BuildFileStream;
this->BuildFileStream = & fout;
- this->WriteString("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
- "<Project "
- "ToolsVersion=\"4.0\" "
- "xmlns=\"http://schemas.microsoft.com/"
- "developer/msbuild/2003\">\n",
- 0);
+
+ //get the tools version to use
+ const std::string toolsVer(this->GlobalGenerator->GetToolsVersion());
+ std::string project_defaults = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ project_defaults.append("<Project ToolsVersion=\"");
+ project_defaults.append(toolsVer +" \" ");
+ project_defaults.append("xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n");
+ this->WriteString(project_defaults.c_str(),0);
+
for(ToolSourceMap::const_iterator ti = this->Tools.begin();
ti != this->Tools.end(); ++ti)
{
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list