Browse Source

cmGlobalNinjaGenerator: run ninja tools in the build directory

Fixes: #20303
Ben Boeckel 5 years ago
parent
commit
f4e02c46fc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/cmGlobalNinjaGenerator.cxx

+ 2 - 0
Source/cmGlobalNinjaGenerator.cxx

@@ -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);