[Cmake-commits] CMake branch, next, updated. v2.8.9-814-g61ec1b7
Brad King
brad.king at kitware.com
Fri Sep 28 08:27:22 EDT 2012
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 61ec1b7a9069bee2a1f8f4785d653667cabda819 (commit)
via f966a12f64ffc2c6bac17f56746016020e0d769a (commit)
via d4b0e1ff39b72b5f8b8e22b454b84749736f1776 (commit)
from cc4ba6e84a69bcb1e5df1d6b6501dd5176def230 (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=61ec1b7a9069bee2a1f8f4785d653667cabda819
commit 61ec1b7a9069bee2a1f8f4785d653667cabda819
Merge: cc4ba6e f966a12
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 28 08:24:31 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 28 08:24:31 2012 -0400
Merge topic 'ninja-link-rsp-expand' into next
f966a12 Merge branch 'ninja-link-rsp-expand_2' into ninja-link-rsp-expand
d4b0e1f Revert "Ninja: don't confuse ninja's rsp files with nmake's"
diff --cc Source/cmNinjaNormalTargetGenerator.cxx
index b51ac72,6f991e2..1ce321e
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@@ -181,16 -179,9 +181,16 @@@ cmNinjaNormalTargetGenerato
} else {
responseFlag = "@";
}
- rspfile = "$RSP_FILE";
+ rspfile = "$out.rsp";
responseFlag += rspfile;
- rspcontent = "$in $LINK_LIBRARIES";
+
+ // build response file content
+ std::string linkOptionVar = cmakeVarLang;
+ linkOptionVar += "_COMPILER_LINKER_OPTION_FLAG_";
+ linkOptionVar += cmTarget::GetTargetTypeName(targetType);
+ const std::string linkOption =
+ GetMakefile()->GetSafeDefinition(linkOptionVar.c_str());
+ rspcontent = "$in " + linkOption + " $LINK_PATH $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
vars.LinkLibraries = "";
}
@@@ -553,25 -539,16 +553,21 @@@ void cmNinjaNormalTargetGenerator::Writ
int linkRuleLength = this->GetGlobalGenerator()->
GetRuleCmdLength(this->LanguageLinkerRule());
+
+ int commandLineLengthLimit = 1;
+ const char* forceRspFile = "CMAKE_NINJA_FORCE_RESPONSE_FILE";
+ if (!this->GetMakefile()->IsDefinitionSet(forceRspFile) &&
+ cmSystemTools::GetEnv(forceRspFile) == 0) {
#ifdef _WIN32
- int commandLineLengthLimit = 8000 - linkRuleLength;
+ commandLineLengthLimit = 8000 - linkRuleLength;
#elif defined(__linux) || defined(__APPLE__)
- // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac
- int commandLineLengthLimit = ((int)sysconf(_SC_ARG_MAX))
- - linkRuleLength - 1000;
+ // for instance ARG_MAX is 2096152 on Ubuntu or 262144 on Mac
+ commandLineLengthLimit = ((int)sysconf(_SC_ARG_MAX))- linkRuleLength - 1000;
#else
- int commandLineLengthLimit = -1;
+ commandLineLengthLimit = -1;
#endif
+ }
- const std::string rspfile = std::string
- (cmake::GetCMakeFilesDirectoryPostSlash()) +
- this->GetTarget()->GetName() + ".rsp";
-
// Write the build statement for this target.
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
comment.str(),
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f966a12f64ffc2c6bac17f56746016020e0d769a
commit f966a12f64ffc2c6bac17f56746016020e0d769a
Merge: dbd46e8 d4b0e1f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 28 08:18:02 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 28 08:18:02 2012 -0400
Merge branch 'ninja-link-rsp-expand_2' into ninja-link-rsp-expand
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4b0e1ff39b72b5f8b8e22b454b84749736f1776
commit d4b0e1ff39b72b5f8b8e22b454b84749736f1776
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 28 08:17:54 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 28 08:17:54 2012 -0400
Revert "Ninja: don't confuse ninja's rsp files with nmake's"
This reverts commit 2e7ffe0748746d15104720aae94200b72903f5cf.
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 05f5b4c..3f3cfbb 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -106,7 +106,6 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
const cmNinjaDeps& implicitDeps,
const cmNinjaDeps& orderOnlyDeps,
const cmNinjaVars& variables,
- const std::string& rspfile,
int cmdLineLimit)
{
// Make sure there is a rule.
@@ -182,17 +181,12 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
// check if a response file rule should be used
std::string buildstr = build.str();
- std::string assignments = variable_assignments.str();
+ const std::string assignments = variable_assignments.str();
const std::string args = arguments.str();
if (cmdLineLimit > 0
&& args.size() + buildstr.size() + assignments.size()
- > (size_t) cmdLineLimit) {
- buildstr += "_RSP_FILE";
- variable_assignments.clear();
- cmGlobalNinjaGenerator::WriteVariable(variable_assignments,
- "RSP_FILE", rspfile, "", 1);
- assignments += variable_assignments.str();
- }
+ > (size_t) cmdLineLimit)
+ buildstr += "_RSPFILE";
os << buildstr << args << assignments;
}
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 24c3916..b2fe243 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -84,7 +84,6 @@ public:
const cmNinjaDeps& implicitDeps,
const cmNinjaDeps& orderOnlyDeps,
const cmNinjaVars& variables,
- const std::string& rspfile = std::string(),
int cmdLineLimit = -1);
/**
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a13e1f0..6f991e2 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -153,7 +153,7 @@ cmNinjaNormalTargetGenerator
cmTarget::TargetType targetType = this->GetTarget()->GetType();
std::string ruleName = this->LanguageLinkerRule();
if (useResponseFile)
- ruleName += "_RSP_FILE";
+ ruleName += "_RSPFILE";
// Select whether to use a response file for objects.
std::string rspfile;
@@ -179,7 +179,7 @@ cmNinjaNormalTargetGenerator
} else {
responseFlag = "@";
}
- rspfile = "$RSP_FILE";
+ rspfile = "$out.rsp";
responseFlag += rspfile;
rspcontent = "$in $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
@@ -549,10 +549,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
int commandLineLengthLimit = -1;
#endif
- const std::string rspfile = std::string
- (cmake::GetCMakeFilesDirectoryPostSlash()) +
- this->GetTarget()->GetName() + ".rsp";
-
// Write the build statement for this target.
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
comment.str(),
@@ -562,7 +558,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
implicitDeps,
emptyDeps,
vars,
- rspfile,
commandLineLengthLimit);
if (targetOutput != targetOutputReal) {
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalNinjaGenerator.cxx | 12 +++---------
Source/cmGlobalNinjaGenerator.h | 1 -
Source/cmNinjaNormalTargetGenerator.cxx | 9 ++-------
3 files changed, 5 insertions(+), 17 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list