Autogen: Register per-config timestamp file with its full path

With AUTOGEN_BETTER_GRAPH_MULTI_CONFIG enabled, the per-config
'<ORIGIN>_autogen/timestamp_<CONFIG>' file was added to the origin target
as a bare file name, which resolves against the source directory.  The
origin target therefore carried a source file that no rule creates, and
the build system could not trace the timestamp file back to the custom
command that creates it.  Under the Visual Studio generators the bogus
path shows up as a <None> item in the project file.

Use the full path instead.
This commit is contained in:
Joerg Bornemann
2026-08-14 10:08:37 +02:00
parent f27e315222
commit 2b5ad7e395
+2 -1
View File
@@ -1615,7 +1615,8 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
for (std::string const& config : this->ConfigsList) {
auto tempTimestampFileName = timestampFileWithoutConfig + config;
auto tempDepFile = depFileWithoutConfig + config;
outputFileWithConfig.Config[config] = tempTimestampFileName;
outputFileWithConfig.Config[config] =
cmStrCat(this->Dir.Build, '/', tempTimestampFileName);
this->AutogenTarget.DepFileRuleName.Config[config] =
cmStrCat(this->Dir.RelativeBuild, '/', tempTimestampFileName);
this->AutogenTarget.DepFile.Config[config] = tempDepFile;