cmGlobalNinjaGenerator: run ninja tools in the build directory

Fixes: #20303
This commit is contained in:
Ben Boeckel
2020-02-03 15:31:15 -05:00
parent 5f04dfe57e
commit f4e02c46fc

View File

@@ -547,6 +547,8 @@ void cmGlobalNinjaGenerator::CleanMetaData()
auto run_ninja_tool = [this](std::vector<char const*> const& args) {
std::vector<std::string> command;
command.push_back(this->NinjaCommand);
command.emplace_back("-C");
command.emplace_back(this->GetCMakeInstance()->GetHomeOutputDirectory());
command.emplace_back("-t");
for (auto const& arg : args) {
command.emplace_back(arg);