summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-03 16:53:21 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-03 16:53:28 (GMT)
commit16d91cbf7e4502f2504bbc8543f5d9ea0732d806 (patch)
tree5b6bef0908215fa97cbcb8f2e13aab242be1d93f /Source
parentb81aef19de9c1986cc4c0a92faa108f20c70f1db (diff)
parent7c664bb5b933e66c390b6edddd2c1de541aad40f (diff)
downloadCMake-16d91cbf7e4502f2504bbc8543f5d9ea0732d806.zip
CMake-16d91cbf7e4502f2504bbc8543f5d9ea0732d806.tar.gz
CMake-16d91cbf7e4502f2504bbc8543f5d9ea0732d806.tar.bz2
Merge topic 'fix_automoc_deps_rule_name'
7c664bb5b9 Fix AUTOMOC deps file to contain correct rule name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4313
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 0493c0f..43e159c 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -1189,8 +1189,15 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
const std::string outputFile =
cmStrCat(this->Dir.Build, "/", timestampFileName);
this->AutogenTarget.DepFile = cmStrCat(this->Dir.Build, "/deps");
+ auto relativeBinaryDir = cmSystemTools::RelativePath(
+ this->LocalGen->GetBinaryDirectory(),
+ this->LocalGen->GetCurrentBinaryDirectory());
+ if (!relativeBinaryDir.empty()) {
+ relativeBinaryDir = cmStrCat(relativeBinaryDir, "/");
+ }
this->AutogenTarget.DepFileRuleName =
- cmStrCat(this->GenTarget->GetName(), "_autogen/", timestampFileName);
+ cmStrCat(relativeBinaryDir, this->GenTarget->GetName(), "_autogen/",
+ timestampFileName);
commandLines.push_back(cmMakeCommandLine(
{ cmSystemTools::GetCMakeCommand(), "-E", "touch", outputFile }));