adridg added a comment.

  In D10450#204623 <>, @kossebau wrote:
  > "This (hopefully) fixes the build failure noticed in the FreeBSD (and some 
linuxes)" - leaves the question: why should it exactly fix it? :)
  From reading the CMake documentation, it seems (but I'll admit that fancy 
dependency stuff is a dark art in CMake) that AUTOGEN_TARGET_DEPENDS shouldn't 
be a **file**, but a **target**. This patch adds a target, created by the given 
command and hooks that into the dependency graph.
  > From discussion of last week on irc, it seemed that the actual problem is 
that the generated make files do not contain the dependency between the JSON 
file that needs to be generated and automoc running over the cpp source file to 
generate the moc file based on the referenced JSON file.
  And that's the whole problem, isn't it. If you force the dependency arc to be 
there -- i.e. by using the target property here -- then it works. Note, though, 
that I haven't dissected a Makefile / ninja file to see that the dependency arc 
is really there. We just tested it by re-running the build a couple of times on 
32- and 48-core machines.
  > Something which e.g. is tried to be solved by the code in the 
`kcoreaddons_add_plugin` macro, by grepping over all the source files to find 
the cpp file which references the JSON file and then create the dependency by
  >   set_property(SOURCE ${dependent_sources} APPEND PROPERTY OBJECT_DEPENDS 
  If this patch fixes the dependency arc, then possibly that (expensive?) 
grepping around isn't needed either.
  I'll try to do some Makefile-dissection.

  R244 KCoreAddons


To: tcberner, #freebsd, mpyne, bshah, dfaure
Cc: adridg, kossebau, #frameworks, michaelh

Reply via email to