Merge topic 'automoc_timestamp_deps' into release-3.18

9a9ed4b9d3 Merge branch 'backport-3.17-automoc_timestamp_deps'
7445c9a58a AutoGen: Add test to check for correct AutoMoc dependencies
a79056bb02 AutoGen: Fix over-specified direct dependencies of custom command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Aleix <aleixpol@kde.org>
Merge-request: !5085
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 0f01f85..32ab9f8 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -733,12 +733,8 @@
     static_cast<int>(cmSystemTools::CalculateCommandLineLengthLimit()) -
     globalGen->GetRuleCmdLength(this->LanguageLinkerDeviceRule(config));
 
-  std::string path = localGen.GetHomeRelativeOutputPath();
-  if (!path.empty()) {
-    path += '/';
-  }
   build.RspFile = this->ConvertToNinjaPath(
-    cmStrCat(path, "CMakeFiles/", genTarget->GetName(),
+    cmStrCat("CMakeFiles/", genTarget->GetName(),
              globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
 
   // Gather order-only dependencies.
@@ -1159,12 +1155,8 @@
       globalGen->GetRuleCmdLength(linkBuild.Rule);
   }
 
-  std::string path = localGen.GetHomeRelativeOutputPath();
-  if (!path.empty()) {
-    path += '/';
-  }
   linkBuild.RspFile = this->ConvertToNinjaPath(
-    cmStrCat(path, "CMakeFiles/", gt->GetName(),
+    cmStrCat("CMakeFiles/", gt->GetName(),
              globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
 
   // Gather order-only dependencies.