[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-275-g9061ec0
Brad King
brad.king at kitware.com
Wed Feb 24 12:33:50 EST 2016
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 9061ec0b86f7dd4fca052c9000b2ceaa14735ac3 (commit)
via dc422d271e4504ebab2176e841480861a17d13e1 (commit)
from da89b7e4b7cbf0c1d8c894e6873216517336b2d3 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9061ec0b86f7dd4fca052c9000b2ceaa14735ac3
commit 9061ec0b86f7dd4fca052c9000b2ceaa14735ac3
Merge: da89b7e dc422d2
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 24 12:33:49 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Feb 24 12:33:49 2016 -0500
Merge topic 'vs14-debug-enum-older-toolsets' into next
dc422d27 VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc422d271e4504ebab2176e841480861a17d13e1
commit dc422d271e4504ebab2176e841480861a17d13e1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Feb 24 12:15:48 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Feb 24 12:29:50 2016 -0500
VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
Since commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for
GenerateDebugInformation, 2016-01-08) we generate invalid project
files for the v110 and v120 toolsets. VS complains:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(639,9):
error MSB4030: "Debug" is an invalid value for the "GenerateDebugInformation" parameter of
the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean".
This reveals that our VS flag map selection should be based on the
toolset instead of the version of VS. However, that will be a
non-trivial change so for now fix this particular use case by
hard-coding a correction to the flag map.
Reported-by: Gregor Jasny <gjasny at googlemail.com>
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6b46773..769edac 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2661,6 +2661,33 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
}
}
+ // Hack to fix flag version selection in a common use case.
+ // FIXME: Select flag table based on toolset instead of VS version.
+ if (this->LocalGenerator->GetVersion() >=
+ cmGlobalVisualStudioGenerator::VS14)
+ {
+ cmGlobalVisualStudio10Generator* gg =
+ static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
+ const char* toolset = gg->GetPlatformToolset();
+ if (toolset &&
+ (cmHasLiteralPrefix(toolset, "v110") ||
+ cmHasLiteralPrefix(toolset, "v120")))
+ {
+ if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation"))
+ {
+ // Convert value from enumeration back to boolean for older toolsets.
+ if (strcmp(debug, "No") == 0)
+ {
+ linkOptions.AddFlag("GenerateDebugInformation", "false");
+ }
+ else if (strcmp(debug, "Debug") == 0)
+ {
+ linkOptions.AddFlag("GenerateDebugInformation", "true");
+ }
+ }
+ }
+ }
+
this->LinkOptions[config] = pOptions.release();
return true;
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list