diff options
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 9cbd502..ee3842d 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -754,6 +754,7 @@ void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os) this->WriteTargetAll(os); this->WriteTargetRebuildManifest(os); + this->WriteTargetClean(os); } void cmGlobalNinjaGenerator::WriteTargetAll(std::ostream& os) @@ -820,3 +821,23 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) implicitDeps, cmNinjaDeps()); } + +void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) +{ + WriteRule(*this->RulesFileStream, + "CLEAN", + "ninja -t clean", + "Cleaning all built files...", + "Rule for cleaning all built files.", + /*depfile=*/ "", + /*restat=*/ false, + /*generator=*/ false); + WriteBuild(os, + "Clean all the built files.", + "CLEAN", + /*outputs=*/ cmNinjaDeps(1, "clean"), + /*explicitDeps=*/ cmNinjaDeps(), + /*implicitDeps=*/ cmNinjaDeps(), + /*orderOnlyDeps=*/ cmNinjaDeps(), + /*variables=*/ cmNinjaVars()); +} |