mirror of
https://github.com/reactos/CMake.git
synced 2024-12-15 07:41:15 +00:00
cmNinjaTargetGenerator: Factor out helper for forced response file check
This commit is contained in:
parent
82c405c473
commit
24c9106b7b
@ -698,9 +698,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||
cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
|
||||
|
||||
int commandLineLengthLimit = 1;
|
||||
const char* forceRspFile = "CMAKE_NINJA_FORCE_RESPONSE_FILE";
|
||||
if (!mf->IsDefinitionSet(forceRspFile) &&
|
||||
cmSystemTools::GetEnv(forceRspFile) == 0)
|
||||
if (!this->ForceResponseFile())
|
||||
{
|
||||
commandLineLengthLimit = calculateCommandLineLengthLimit(
|
||||
globalGen.GetRuleCmdLength(this->LanguageLinkerRule()));
|
||||
|
@ -795,3 +795,10 @@ void cmNinjaTargetGenerator::addPoolNinjaVariable(
|
||||
vars["pool"] = pool;
|
||||
}
|
||||
}
|
||||
|
||||
bool cmNinjaTargetGenerator::ForceResponseFile()
|
||||
{
|
||||
static std::string const forceRspFile = "CMAKE_NINJA_FORCE_RESPONSE_FILE";
|
||||
return (this->GetMakefile()->IsDefinitionSet(forceRspFile) ||
|
||||
cmSystemTools::GetEnv(forceRspFile) != 0);
|
||||
}
|
||||
|
@ -152,6 +152,8 @@ protected:
|
||||
cmGeneratorTarget* target,
|
||||
cmNinjaVars& vars);
|
||||
|
||||
bool ForceResponseFile();
|
||||
|
||||
private:
|
||||
cmLocalNinjaGenerator* LocalGenerator;
|
||||
/// List of object files for this target.
|
||||
|
Loading…
Reference in New Issue
Block a user