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

Timenkov Yuri ytimenkov at gmail.com
Tue Sep 30 15:39:48 EDT 2008


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.

>
>
> 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<http://jonas-baehr.de/%7Ejonas/CMakeLists.txt>
>
> bye,
> Jonas
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080930/c5a53601/attachment.htm>


More information about the CMake mailing list