mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
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.
This commit is contained in:
@@ -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) };
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user