[CMake] ADD_CUSTOM_COMMAND doesn't work as expected

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu Jul 20 09:34:48 EDT 2006


Von: Brad King <brad.king at kitware.com>
> Christian Ehrlicher wrote:
<snip>
> >>
> >> What kind of files are these ?
> >> Ideally you should add them to the list of sources for the target. If
> they
> >> don't have a source-file suffix, they won't be compiled. Or you could
> use
> >> add_custom_command( main POSTBUILD COMMAND ...) so they will be built
> after
> >> your executable has been built.
> >>
> > They're non source files and also the suffix isn't a source-file suffix.
> > I've now used your suggestion and it doesn't work like as I need.
> > - when I delete one of the generated files, they're not rebuild on next
> make run (and make install fails I think), PRE_BUILD doesn't work either
> > - when one of the sources changed, it isn't rebuild
> > - when executable is rebuild, all generated files are rebuild (but there
> is no need to rebuild them)
> > 
> > And why does my first solution works with msvc ide? Couldn't this simply
> extended to work on all generators?
> 
> The first solution is correct.  This was a bug in the Makefile
> generator.  It was fixed in CVS a few weeks ago and will be in 2.4.3.
> 
So my next question - when is 2.4.3 planned? ;-)

Thx,
Christian

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl


More information about the CMake mailing list