D10450: Generate a custom target in kcoreaddons_desktop_to_json

Michael Pyne noreply at phabricator.kde.org
Sat Feb 17 22:48:53 UTC 2018


mpyne added a comment.


  OK then, I think @kossebau is right in that this is a dependency issue in the `lookandfeel` part of plasma-desktop.  The `kcm_lookandfeel` target declares the JSON dependency (with the CMake macro) in time for CMake to care about it and ensure the generated build system picks up the dependency for automoc to run.  The `lookandfeel` command line tool target does not add the dependency on the JSON file and there's no other reason for CMake to know that the JSON file must be generated before `lookandfeel`'s AUTOMOC can complete.
  
  ie. CMake perceives this order as legal:
  
  1. AUTOMOC for `lookandfeel`
  2. moc runs on kcm.cpp
  3. JSON generation for AUTOMOC for `kcm_lookandfeel`
  4. kcm_lookandfeel.json is generated
  5. AUTOMOC for `kcm_lookandfeel`
  6. moc runs on kcm.cpp
  7. build continues
  
  2 and 6 are identical here and it seems that CMake is smart enough to only do this once in the whole build, but CMake only has the dependency on the JSON for the moc at step 6, not step 2, so CMake doesn't know that it also needs to delay `lookandfeel`'s AUTOMOC phase until after JSON generation.
  
  That all said, if D10607 <https://phabricator.kde.org/D10607> works (and that diff is precisely how I'd suggest handling the issue), then I think we can then abandon this revision.  Let me know if you disagree.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D10450

To: tcberner, #freebsd, mpyne, bshah, dfaure, rakuco
Cc: bcooksley, rikmills, rakuco, kfunk, adridg, kossebau, #frameworks, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180217/6e5f3bff/attachment.html>


More information about the Kde-frameworks-devel mailing list