[Cmake-commits] CMake branch, next, updated. v3.6.0-rc1-123-g9a4fa80
Brad King
brad.king at kitware.com
Wed Jun 8 12:23:55 EDT 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 9a4fa800379b26bfbae3a9a98ed94baf58166713 (commit)
via ea59867187e8bdb8a7ffda37ad58e7f8493ebf7c (commit)
via 1cfc750150065ee3b65ad66d2b37a3b28a9e799d (commit)
from 15e1ee72d6d13ab02cbfd727a5702a7ce8bd18a2 (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=9a4fa800379b26bfbae3a9a98ed94baf58166713
commit 9a4fa800379b26bfbae3a9a98ed94baf58166713
Merge: 15e1ee7 ea59867
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 8 12:23:54 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jun 8 12:23:54 2016 -0400
Merge topic 'ninja-no-ranlib-windows' into next
ea598671 Run ranlib on archives only if the tool is available
1cfc7501 CMake Nightly Date Stamp
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea59867187e8bdb8a7ffda37ad58e7f8493ebf7c
commit ea59867187e8bdb8a7ffda37ad58e7f8493ebf7c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Jun 8 10:15:29 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 8 12:00:44 2016 -0400
Run ranlib on archives only if the tool is available
CMakeFindBinUtils sets CMAKE_RANLIB to `:` if it is not available in
order to get a no-op. This does not work on a Windows host build
environment that runs commands in `cmd` instead of `sh`. Teach the
Ninja and Makefile generators to simply skip the command if it is `:`.
This this was already done by the Makefile generator since commit
v2.6.0~3161 (BUG: Do not write link script lines that use the ':',
2006-06-18), but only when using a link script.
Reported-by: Michael Jäntsch <Michael.Jaentsch at gmx.de>
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 128291d..0998eb8 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -676,7 +676,10 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
i != archiveFinishCommands.end(); ++i) {
std::string cmd = *i;
this->LocalGenerator->ExpandRuleVariables(cmd, vars);
- real_link_commands.push_back(cmd);
+ // If there is no ranlib the command will be ":". Skip it.
+ if (!cmd.empty() && cmd[0] != ':') {
+ real_link_commands.push_back(cmd);
+ }
}
} else {
// Get the set of commands.
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3e91545..be6afee 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -144,6 +144,14 @@ std::string cmNinjaNormalTargetGenerator::LanguageLinkerRule() const
this->GetGeneratorTarget()->GetName());
}
+struct cmNinjaRemoveNoOpCommands
+{
+ bool operator()(std::string const& cmd)
+ {
+ return cmd.empty() || cmd[0] == ':';
+ }
+};
+
void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
{
cmState::TargetType targetType = this->GetGeneratorTarget()->GetType();
@@ -231,6 +239,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
i != linkCmds.end(); ++i) {
this->GetLocalGenerator()->ExpandRuleVariables(*i, vars);
}
+ {
+ // If there is no ranlib the command will be ":". Skip it.
+ std::vector<std::string>::iterator newEnd = std::remove_if(
+ linkCmds.begin(), linkCmds.end(), cmNinjaRemoveNoOpCommands());
+ linkCmds.erase(newEnd, linkCmds.end());
+ }
+
linkCmds.insert(linkCmds.begin(), "$PRE_LINK");
linkCmds.push_back("$POST_BUILD");
std::string linkCmd =
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmMakefileLibraryTargetGenerator.cxx | 5 ++++-
Source/cmNinjaNormalTargetGenerator.cxx | 15 +++++++++++++++
3 files changed, 20 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list