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

Brad King brad.king at kitware.com
Wed Aug 11 16:07:21 EDT 2010


On 08/05/2010 02:29 PM, Andreas Pakulat wrote:
> 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.
[snip]
On 08/11/2010 03:46 PM, Andreas Pakulat wrote:
> On 11.08.10 11:08:22, Brad King wrote:
>> Please send me (off list) the whole CMakeFiles directory
>
> Here you go, I did:
>
> cmake -DCMAKE_INSTALL_PREFIX=$HOME/kdevelop-split ../
> <copy builddir_after_cmake>
> make -j3, waited for it to fail due to not-generated ui-header
> <copy builddir_after_make_j3>
> make, wait until completely done
> <copy builddir_after_make_done>

Even after the first run, build.make contains this:

plugins/reviewboard/ui_reviewpatch.h: ../plugins/reviewboard/reviewpatch.ui
  ... rule to run uic ...

plugins/reviewboard/CMakeFiles/kdevreviewboard.dir/depend: plugins/reviewboard/ui_reviewpatch.h
  ... rule to scan dependencies of kdevreviewboard ...

This is what causes the header to be generated before dependencies
are scanned (as you observed in the quote above).  I do not think
anything in the kdereviewboard target can compile before the above
steps run.

What source file is it compiling when it fails to find the header?
In what target is its object file?

-Brad


More information about the CMake mailing list