playground/devtools/kdevelop4-extra-plugins/python/parser

Andreas Pakulat apaku at gmx.de
Tue Jul 10 10:38:41 CEST 2007


On 09.07.07 23:22:23, Alexander Neundorf wrote:
> On Monday 09 July 2007 14:22, Andreas Pakulat wrote:
> > On 09.07.07 15:42:08, Dirk Mueller wrote:
> > > On Friday, 6. July 2007, Andreas Pakulat wrote:
> > > > Thats not feasible, because some of the sources (though not all) may be
> > > > generated (or may be not generated if the generator is missing) and
> > > > thus I'd have to copy the generation code into each CMakeLists.txt that
> > > > wants to use the sources.
> > >
> > > Ehm, parse error here. you only have to SET a variable and use that one
> > > in other places. Unless I'm missing something.
> >
> > Yeap you are. I tried that and this doesn't work because in
> > subdirectories its not visible anymore that the files are generated. For
> > example I have
> >
> > python/CMakeLists.txt with set_source_files_properties( ${foo_SRCS}
> > GENERATED )
> 
> Why do you need this ? You should not need to set this at all, it should be 
> done automatically. Which purpose does it have ?

Hmm, right it doesn't complain (I thought it would), so this was
something like a copy-paste error :)

> > python/parser/CMakeLists.txt with
> >
> > add_executable(python-parser ${foo_SRCS} )
> >
> >
> > Then cmake will complain that it doesn't know how to create the files in
> > foo_SRCS for the python-parser target.
> >
> > And always setting the foo_SRCS GENERATED in the subdirs is not really
> > usable either as they are only generated when you've got the generator
> > tool installed (which is not required). So I'd again need to have
> > if(FOO_FOUND) stuff everywhere.
> 
> Can you put the rules for generating the files in the directories where the 
> file are used, e.g. with some macros ?

Sure I can, but that still looks like a workaround and not a proper
solution. Is this the intended behaviour - that the fileproperties of
source files are not inherited in the "tree" CMakeLists.txt files?

Andreas

-- 
You will not be elected to public office this year.


More information about the Kde-buildsystem mailing list