|
|
@@ -1816,17 +1816,21 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
|
|
if (this->GlobalSettingIsOn("CMAKE_SUPPRESS_REGENERATION")) {
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ cmake* cm = this->GetCMakeInstance();
|
|
|
const auto& lg = this->LocalGenerators[0];
|
|
|
|
|
|
{
|
|
|
cmNinjaRule rule("RERUN_CMAKE");
|
|
|
- rule.Command =
|
|
|
- cmStrCat(this->CMakeCmd(), " --regenerate-during-build -S",
|
|
|
- lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
|
|
|
- cmOutputConverter::SHELL),
|
|
|
- " -B",
|
|
|
- lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::SHELL));
|
|
|
+ rule.Command = cmStrCat(
|
|
|
+ this->CMakeCmd(), " --regenerate-during-build",
|
|
|
+ cm->GetIgnoreWarningAsError() ? " --compile-no-warning-as-error" : "",
|
|
|
+ " -S",
|
|
|
+ lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
|
|
|
+ cmOutputConverter::SHELL),
|
|
|
+ " -B",
|
|
|
+ lg->ConvertToOutputFormat(lg->GetBinaryDirectory(),
|
|
|
+ cmOutputConverter::SHELL));
|
|
|
rule.Description = "Re-running CMake...";
|
|
|
rule.Comment = "Rule for re-running cmake.";
|
|
|
rule.Generator = true;
|
|
|
@@ -1850,7 +1854,6 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
|
|
reBuild.Variables["pool"] = "console";
|
|
|
}
|
|
|
|
|
|
- cmake* cm = this->GetCMakeInstance();
|
|
|
if (this->SupportsManifestRestat() && cm->DoWriteGlobVerifyTarget()) {
|
|
|
{
|
|
|
cmNinjaRule rule("VERIFY_GLOBS");
|