[CMake] custom command question

Doug Henry develop at brilligent.com
Mon Aug 28 10:52:50 EDT 2006


Thanks for the explaination.  I added the files to the target list as
suggested by Filipe, and it worked.  It is nice to know this is the proper
way to do it.

On 8/28/06, Brad King <brad.king at kitware.com> wrote:
>
> Doug Henry wrote:
> > No, since it is a dependency of a source file that is included in the
> > executable I would expect it to be handled (it was in previous
> > releases).  It seems that cmake does know about it, because it gives an
> > error with the correct path to the file that needs to be generated.  I
> > don't know why cmake will not run the custom command anymore.  I suspect
> > that the source files I generate this way are created because they are
> > in the list as you suggest.
>
> Actually CMake never knew about the dependency.  It was just an artifact
> of the way the Makefile generator was implemented that it ever appeared
> to work.  In fact it was possible to not work in a parallel build, so we
> considered this "feature" of the Makefile generator a bug and fixed it.
> It didn't work in the Visual Studio generators at all.
>
> The only way to get this to work reliably is to add the output of the
> custom command as a source file of the target that needs it.  Look at
> the end of this FAQ answer:
>
>
> http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060828/fa83387c/attachment.htm


More information about the CMake mailing list