Ninja: Refactor restat to be a string internally
This will allow values other than "" and "1" to be generated in the rules.ninja file.
This commit is contained in:
parent
ef42e57d47
commit
67bd514adc
|
@ -242,7 +242,7 @@ void cmGlobalNinjaGenerator::AddCustomCommandRule()
|
||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ true,
|
/*restat*/ "1",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ cmGlobalNinjaGenerator::AddMacOSXContentRule()
|
||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ false,
|
/*restat*/ "",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ void cmGlobalNinjaGenerator::WriteRule(std::ostream& os,
|
||||||
const std::string& deptype,
|
const std::string& deptype,
|
||||||
const std::string& rspfile,
|
const std::string& rspfile,
|
||||||
const std::string& rspcontent,
|
const std::string& rspcontent,
|
||||||
bool restat,
|
const std::string& restat,
|
||||||
bool generator)
|
bool generator)
|
||||||
{
|
{
|
||||||
// Make sure the rule has a name.
|
// Make sure the rule has a name.
|
||||||
|
@ -408,10 +408,10 @@ void cmGlobalNinjaGenerator::WriteRule(std::ostream& os,
|
||||||
os << "rspfile_content = " << rspcontent << "\n";
|
os << "rspfile_content = " << rspcontent << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(restat)
|
if(!restat.empty())
|
||||||
{
|
{
|
||||||
cmGlobalNinjaGenerator::Indent(os, 1);
|
cmGlobalNinjaGenerator::Indent(os, 1);
|
||||||
os << "restat = 1\n";
|
os << "restat = " << restat << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(generator)
|
if(generator)
|
||||||
|
@ -607,7 +607,7 @@ void cmGlobalNinjaGenerator::AddRule(const std::string& name,
|
||||||
const std::string& deptype,
|
const std::string& deptype,
|
||||||
const std::string& rspfile,
|
const std::string& rspfile,
|
||||||
const std::string& rspcontent,
|
const std::string& rspcontent,
|
||||||
bool restat,
|
const std::string& restat,
|
||||||
bool generator)
|
bool generator)
|
||||||
{
|
{
|
||||||
// Do not add the same rule twice.
|
// Do not add the same rule twice.
|
||||||
|
@ -1122,7 +1122,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
||||||
/*deptype=*/ "",
|
/*deptype=*/ "",
|
||||||
/*rspfile=*/ "",
|
/*rspfile=*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat=*/ false,
|
/*restat=*/ "",
|
||||||
/*generator=*/ true);
|
/*generator=*/ true);
|
||||||
|
|
||||||
cmLocalNinjaGenerator *ng = static_cast<cmLocalNinjaGenerator *>(lg);
|
cmLocalNinjaGenerator *ng = static_cast<cmLocalNinjaGenerator *>(lg);
|
||||||
|
@ -1206,7 +1206,7 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
|
||||||
/*deptype=*/ "",
|
/*deptype=*/ "",
|
||||||
/*rspfile=*/ "",
|
/*rspfile=*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat=*/ false,
|
/*restat=*/ "",
|
||||||
/*generator=*/ false);
|
/*generator=*/ false);
|
||||||
WriteBuild(os,
|
WriteBuild(os,
|
||||||
"Clean all the built files.",
|
"Clean all the built files.",
|
||||||
|
@ -1229,7 +1229,7 @@ void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
|
||||||
/*deptype=*/ "",
|
/*deptype=*/ "",
|
||||||
/*rspfile=*/ "",
|
/*rspfile=*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat=*/ false,
|
/*restat=*/ "",
|
||||||
/*generator=*/ false);
|
/*generator=*/ false);
|
||||||
WriteBuild(os,
|
WriteBuild(os,
|
||||||
"Print all primary targets available.",
|
"Print all primary targets available.",
|
||||||
|
|
|
@ -125,7 +125,7 @@ public:
|
||||||
const std::string& deptype,
|
const std::string& deptype,
|
||||||
const std::string& rspfile,
|
const std::string& rspfile,
|
||||||
const std::string& rspcontent,
|
const std::string& rspcontent,
|
||||||
bool restat,
|
const std::string& restat,
|
||||||
bool generator);
|
bool generator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -245,7 +245,7 @@ public:
|
||||||
const std::string& deptype,
|
const std::string& deptype,
|
||||||
const std::string& rspfile,
|
const std::string& rspfile,
|
||||||
const std::string& rspcontent,
|
const std::string& rspcontent,
|
||||||
bool restat,
|
const std::string& restat,
|
||||||
bool generator);
|
bool generator);
|
||||||
|
|
||||||
bool HasRule(const std::string& name);
|
bool HasRule(const std::string& name);
|
||||||
|
|
|
@ -256,7 +256,7 @@ cmNinjaNormalTargetGenerator
|
||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
rspfile,
|
rspfile,
|
||||||
rspcontent,
|
rspcontent,
|
||||||
/*restat*/ false,
|
/*restat*/ "",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ cmNinjaNormalTargetGenerator
|
||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ false,
|
/*restat*/ "",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
else
|
else
|
||||||
this->GetGlobalGenerator()->AddRule("CMAKE_SYMLINK_LIBRARY",
|
this->GetGlobalGenerator()->AddRule("CMAKE_SYMLINK_LIBRARY",
|
||||||
|
@ -292,7 +292,7 @@ cmNinjaNormalTargetGenerator
|
||||||
/*deptype*/ "",
|
/*deptype*/ "",
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ false,
|
/*restat*/ "",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ cmNinjaTargetGenerator
|
||||||
deptype,
|
deptype,
|
||||||
/*rspfile*/ "",
|
/*rspfile*/ "",
|
||||||
/*rspcontent*/ "",
|
/*rspcontent*/ "",
|
||||||
/*restat*/ false,
|
/*restat*/ "",
|
||||||
/*generator*/ false);
|
/*generator*/ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue