mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
Fix AUTOMOC deps file to contain correct rule name
The rule name should include the current binary path relative to the top level binary path. Fixes: #20298
This commit is contained in:
@@ -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 }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user