[CMake] Bug? Setting properties on non existing source files gives an error

Jonas Bähr jonas.baehr at web.de
Wed Oct 1 10:54:21 EDT 2008


Am 30.09.2008 um 21:39 schrieb Timenkov Yuri:

> On Tue, Sep 30, 2008 at 3:45 PM, Jonas Bähr <jonas.baehr at web.de>  
> wrote:
> > Hi,
> >
> > I'm using a macro [1] iterating over a list of source files and  
> setting a
> > COMPILE_FLAGS property. The problem is that there are some files  
> in the list
> > which are generated (Qt moc files, produces by QT_WRAP_CPP) which  
> do not
> > exist at cmake time. The SET_SOURCE_FILE_PROPERTIES command however,
> > terminates cmake with an error on the generated file, saying that  
> he can't find the
> > source file. Obviously, it's generated at build time.
> > Is this a bug or am I missing something? The original  
> CMakeList.txt can be found at
> > [2]
> I don't know whether it help, but you can look at GENERATED source  
> file property. That is you should first add source file to target,  
> and next set it's "generated" property to true. This can tell CMake  
> to don't look for this file during dependency scanning.

Thanks for this info. Unfortunately it didn't help to set the  
GENERATED property to TRUE for the wrapped moc files.
However, I tried cmake-2.6 today and this problem vanished. 2.6  
doesn't seem to have problems with setting properties on build-time  
generated files. nice.

bye,
Jonas

>
>
> >
> > I'm using cmake 2.4.8 on gentoo linux.
> >
> > [1] http://playerstage.svn.sourceforge.net/viewvc/playerstage/ 
> code/player/trunk/cmake/UsePlayerC%2B%2B.cmake? 
> revision=6514&view=markup
> > [2] http://jonas-baehr.de/~jonas/CMakeLists.txt
>
> > bye,
> > Jonas
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



More information about the CMake mailing list