[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-147-gd4bf5af
Brad King
brad.king at kitware.com
Tue Feb 14 13:28:58 EST 2017
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 d4bf5af08435c5bdc0a1575f9b1763844dabc148 (commit)
via 8ba6dc362dd1c5b073c68f8a873a91ddd2743e34 (commit)
via 1d04d2ce3609da4c4f8d59ccfabd8848a6e765d4 (commit)
from 20d39160baf3301acdfac3f844b2c23cb1a2dd9b (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=d4bf5af08435c5bdc0a1575f9b1763844dabc148
commit d4bf5af08435c5bdc0a1575f9b1763844dabc148
Merge: 20d3916 8ba6dc3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 14 13:28:57 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Feb 14 13:28:57 2017 -0500
Merge topic 'vs-refactor-libs' into next
8ba6dc36 VS: Place CMAKE_<LANG>_STANDARD_LIBRARIES after other libraries
1d04d2ce VS: Refactor parsing of CMAKE_<LANG>_STANDARD_LIBRARIES
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8ba6dc362dd1c5b073c68f8a873a91ddd2743e34
commit 8ba6dc362dd1c5b073c68f8a873a91ddd2743e34
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 14 11:18:51 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 14 11:21:08 2017 -0500
VS: Place CMAKE_<LANG>_STANDARD_LIBRARIES after other libraries
Make the VS generator consistent with the Ninja and Makefile generators
that place the libraries listed in this variable after other libraries
on the link command line. These system libraries never depend on the
project libraries.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a60222e..f084e19 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2781,13 +2781,6 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
flags += " ";
flags += flagsConfig;
}
- std::string standardLibsVar = "CMAKE_";
- standardLibsVar += linkLanguage;
- standardLibsVar += "_STANDARD_LIBRARIES";
- std::string const libs =
- this->Makefile->GetSafeDefinition(standardLibsVar.c_str());
- std::vector<std::string> libVec;
- cmSystemTools::ParseWindowsCommandLine(libs.c_str(), libVec);
cmComputeLinkInformation* pcli =
this->GeneratorTarget->GetLinkInformation(config.c_str());
@@ -2797,10 +2790,17 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
this->Name.c_str());
return false;
}
- // add the libraries for the target to libs string
cmComputeLinkInformation& cli = *pcli;
+
+ std::vector<std::string> libVec;
std::vector<std::string> vsTargetVec;
this->AddLibraries(cli, libVec, vsTargetVec);
+ std::string standardLibsVar = "CMAKE_";
+ standardLibsVar += linkLanguage;
+ standardLibsVar += "_STANDARD_LIBRARIES";
+ std::string const libs =
+ this->Makefile->GetSafeDefinition(standardLibsVar.c_str());
+ cmSystemTools::ParseWindowsCommandLine(libs.c_str(), libVec);
linkOptions.AddFlag("AdditionalDependencies", libVec);
// Populate TargetsFileAndConfigsVec
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1d04d2ce3609da4c4f8d59ccfabd8848a6e765d4
commit 1d04d2ce3609da4c4f8d59ccfabd8848a6e765d4
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Feb 14 11:15:08 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 14 11:15:08 2017 -0500
VS: Refactor parsing of CMAKE_<LANG>_STANDARD_LIBRARIES
Parse the value as a command line string just as the MS CRT would.
This makes the VS generator behavior consistent with how the string
is used by the Ninja and Makefile generators.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a7edc95..a60222e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2784,22 +2784,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
std::string standardLibsVar = "CMAKE_";
standardLibsVar += linkLanguage;
standardLibsVar += "_STANDARD_LIBRARIES";
- std::string libs =
+ std::string const libs =
this->Makefile->GetSafeDefinition(standardLibsVar.c_str());
- // Remove trailing spaces from libs
- std::string::size_type pos = libs.size() - 1;
- if (!libs.empty()) {
- while (libs[pos] == ' ') {
- pos--;
- }
- }
- if (pos != libs.size() - 1) {
- libs = libs.substr(0, pos + 1);
- }
- // Replace spaces in libs with ;
- std::replace(libs.begin(), libs.end(), ' ', ';');
std::vector<std::string> libVec;
- cmSystemTools::ExpandListArgument(libs, libVec);
+ cmSystemTools::ParseWindowsCommandLine(libs.c_str(), libVec);
cmComputeLinkInformation* pcli =
this->GeneratorTarget->GetLinkInformation(config.c_str());
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 28 ++++++++--------------------
1 file changed, 8 insertions(+), 20 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list