Browse Source

cmNinjaTargetGenerator: scanning depends on the module metadata

Fixes: #25531
Ben Boeckel 1 year ago
parent
commit
60a8736378
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Source/cmNinjaTargetGenerator.cxx

+ 2 - 0
Source/cmNinjaTargetGenerator.cxx

@@ -1195,6 +1195,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
                this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget),
                this->GetGlobalGenerator()->ConfigDirectory(config), '/',
                language, "Modules.json"));
+    build.ImplicitDeps.emplace_back(
+      this->GetTargetDependInfoPath(language, config));
     for (auto const& scanFiles : scanningFiles) {
       if (!scanFiles.ScanningOutput.empty()) {
         build.ExplicitDeps.push_back(scanFiles.ScanningOutput);