[CMake] Dependency bug in cmake with a custom-command

Ryan Pavlik rpavlik at iastate.edu
Thu Aug 5 16:44:46 EDT 2010


Do you need to set the sourcefile property GENERATED to true?  (I'd think
that would be automatic, but worth a try.)

Ryan

On Thu, Aug 5, 2010 at 1:29 PM, Andreas Pakulat <apaku at gmx.de> wrote:

> Hi,
>
> we're currently hitting what looks like a dependency problem with CMake
> and a custom-command. Unfortunately I couldn't reproduce this so far
> with a small example and it also only happens with one of the targets
> we're building in kdevplatform. This code was recently added, but looks
> the same as another plugin cmake-code and cpp-code wise.
>
> Ok, so here's the deal: We're using a KDE macro to run Qt's uic on our
> .ui files and add the generated header filename into a cmake variable.
> This cmake variable is then passed onto a add_library call (through
> another macro). Now when running make in a freshly created builddir
> using -j3 or so, the rule for generating the ui_xxx.h header is not
> executed before trying to compile the file that uses the header...
>
> I'm using CMake 2.8.2 here currently (or rather current HEAD of the
> release branch)
>
> This problem is only reproduceable after a make clean, once I hit the
> error and do another make -j3 run, the dependencies are proper and hence
> the generation is done.
>
> I've noticed that after the first failing run the depend.make and
> depend.internal files suddenly exist/have content. So it seems that
> cmake generates this info 'too late' and hence doesn't generate the
> ui-header early enough. Whats a bit strange though is that apparently in
> other plugins this stuff works.
>
> One more info: I'm seeing the 'Scanning dependencies of target
> kdevpatchreview' message a lot later than the error when using -k with
> make. And at that point I also see the 'Generating ui_xxx.h' message.
>
> Andreas
>
> --
> Good news from afar can bring you a welcome visitor.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100805/bb4ec58e/attachment.htm>


More information about the CMake mailing list