summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-11 11:42:43 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-13 15:20:28 (GMT)
commit054954d855fea6f4dd31fbd78c5e0cab0635396e (patch)
tree2cd31ef145bbe24d5c0634d57620c9d1382d8441
parent30a550d6ade191e6510fb74a73fe34f1615b6086 (diff)
downloadCMake-054954d855fea6f4dd31fbd78c5e0cab0635396e.zip
CMake-054954d855fea6f4dd31fbd78c5e0cab0635396e.tar.gz
CMake-054954d855fea6f4dd31fbd78c5e0cab0635396e.tar.bz2
Ninja: Use clean target instead of clean tool in `cmake --target clean` calls
A convenience `clean` target for the Ninja generator exists since commit 3bd41f2eb5. It's safe to call `ninja clean` instead of `ninja -t clean`. This removes the exception mapping of the `clean` target in `cmake --build ... --target clean` calls to the Ninja `-t clean` tool.
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
-rw-r--r--Source/cmGlobalNinjaGenerator.h2
2 files changed, 1 insertions, 7 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 760a5ab..1b973e0 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -679,11 +679,7 @@ cmGlobalNinjaGenerator::GenerateBuildCommand(
makeCommand.Add(makeOptions.begin(), makeOptions.end());
for (const auto& tname : targetNames) {
if (!tname.empty()) {
- if (tname == "clean") {
- makeCommand.Add("-t", "clean");
- } else {
- makeCommand.Add(tname);
- }
+ makeCommand.Add(tname);
}
}
return { std::move(makeCommand) };
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ce9d124..ffcea60 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -43,8 +43,6 @@ struct cmDocumentationEntry;
* it is handle by Ninja's -v option.
* - We don't care about computing any progress status since Ninja manages
* it itself.
- * - We don't care about generating a clean target since Ninja already have
- * a clean tool.
* - We generate one build.ninja and one rules.ninja per project.
* - We try to minimize the number of generated rules: one per target and
* language.