[CMake] Cannot find source file.

Alexander Neundorf a.neundorf-work at gmx.net
Thu Dec 10 16:18:13 EST 2009


On Thursday 10 December 2009, Tyler Roscoe wrote:
> On Thu, Dec 10, 2009 at 02:14:28PM -0600, Tim St. Clair wrote:
> > Do all files *have* to be present during generation? Or is there some
> > lazy evaluation?
>
> Look at the GENERATED property for source files.
>
> > The file it is looking for is one of many gen'd files.  It would be a
> > pain if I had to update all the command outputs in order to create the
> > deps.
>
> Having well-constructed links between command outputs and dependencies
> sounds like a really good idea to me.

Yes, it's even necessary. If your add_custom_commands() don't list all the 
files they generate and if not all generated files are listed as sources for 
the target which needs them then the dependencies will be incomplete, and 
builds (or at least parallel builds) will break.

Alex


More information about the CMake mailing list