[CMake] Dependency bug in cmake with a custom-command

Andreas Pakulat apaku at gmx.de
Thu Aug 19 11:46:21 EDT 2010


On 19.08.10 09:26:26, Brad King wrote:
> On 08/18/2010 01:01 AM, Andreas Pakulat wrote:
> > On 17.08.10 14:53:02, Brad King wrote:
> >> The source file is being compiled in a target that does not
> >> wait for the header to be generated before compiling.  We can
> >> add a dependency on the target the does provide the header.
> > 
> > Instead I've added the kde4_add_ui_files to the test-target too, so it
> > doesn't need a dependency onto the plugin target (somehow I don't like
> > that, can't explain rationally why though).
> 
> This may cause the ui files to be generated twice, possibly conflicting
> if the rules happen to run in parallel.  If they have different output
> directories then that is okay.  If they are going to the same place it
> will be a problem.

They have different output directories. In the case of the same output dirs
that will definetly produce problems (though not for 'everybody' as it
seems), we had that with another kdevelop plugin which runs a
parser-generator and there where two targets (one custom-target one normal)
that both depended onto the generated files. This produced build-erros when
running make -j, but not for everybody and not reliably...

Andreas

-- 
You will have a long and boring life.


More information about the CMake mailing list