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

Andreas Pakulat apaku at gmx.de
Wed Aug 11 19:04:45 EDT 2010


On 11.08.10 16:07:21, Brad King wrote:
> 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?

reviewpatchdialog.cpp which has #include "ui_reviewpatch.h"

> In what target is its object file?

kdevreviewboard is the target with the .cpp:

set(kdevreviewboard_PART_SRCS
    reviewboardplugin.cpp
    reviewpatchdialog.cpp
    reviewboardjobs.cpp
)
kde4_add_ui_files(kdevreviewboard_PART_SRCS reviewpatch.ui)

kde4_add_plugin(kdevreviewboard ${kdevreviewboard_PART_SRCS})

Andreas

-- 
Your step will soil many countries.


More information about the CMake mailing list