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

Alexander Neundorf neundorf at kde.org
Tue Jul 10 05:22:23 CEST 2007


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 ?

> 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 ?

Alex


More information about the Kde-buildsystem mailing list