<div dir="ltr">Before replacing a file, tblgen checks whether its content is identical. This keeps the time stamps from being updated without any change being made.<div><br></div><div>The command in add_custom_command is not made a file dependency. The idea is that the command's input file determines the output file's content, not the algorithm that does it.</div><div><br></div><div>See <a href="https://cmake.org/cmake/help/latest/command/add_custom_command.html#command:add_custom_command">https://cmake.org/cmake/help/latest/command/add_custom_command.html#command:add_custom_command</a></div><div><br></div><div>> Whenever a target is used as a command to execute or is mentioned in a
generator expression as a command argument, a target-level dependency
will be added automatically so that the mentioned target will be built
before any target using this custom command. However this does NOT add
a file-level dependency that would cause the custom command to re-run
whenever the executable is recompiled. List target names with
the <code class="gmail-docutils gmail-literal gmail-notranslate"><span class="gmail-pre">DEPENDS</span></code> option to add such file-level dependencies.</div><div> </div><div>Michael</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 11. Aug. 2020 um 10:39 Uhr schrieb Paul C. Anagnostopoulos via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This morning I did a build with Ninja, which mysteriously decided to rebuild the entire system (something about a deps stamp being corrupted). When it was done, I had a new llvm-tblgen.exe, but all the target .inc files were old. Hmm. So I touched one of the TableGen source files and did another build. Again, a new llvm-tblgen.exe but no new .inc files. I do, however, have a new .inc.d file corresponding to each .inc file.<br>
<br>
I notice that those .inc.d files do not list llvm-tblgen.exe as a dependency. Is that why the .inc files aren't rebuilt? If so, what is the trick?<br>
<br>
----------------------------------------------------------------<br>
Windfall Paul C. Anagnostopoulos <br>
----------------------------------------------------------<br>
Software 978 369-0839<br>
<a href="http://www.windfall.com" rel="noreferrer" target="_blank">www.windfall.com</a><br>
----------------------------------------------------------------<br>
My life has been filled with calamities,<br>
some of which actually happened.<br>
---Mark Twain <br>
<br>
Guga 'mzimba, sala 'nhliziyo <br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>