D19590: fix parallel building by forcing correct dependency order

Harald Sitter noreply at phabricator.kde.org
Thu Mar 7 11:00:41 GMT 2019


sitter created this revision.
Herald added a reviewer: KDE Games.
Herald added a subscriber: kde-games-devel.
sitter requested review of this revision.

REVISION SUMMARY
  parallel builds (-jNN) would fail with the new test target because it
  incorrectly orders itself.
  
  kpat has settings.kcfg which gets generated into settings.h which gets
  included by (e.g. klondike.cpp), making that cpp file dependent on the
  generated settings.h and transitively the test target would depend on
  it too.
  since this previously was not accounted for the test target would
  semi-consistently fail to build when it was built before the kpat target
  and as a result the settings.h was not yet generated.
  (i.e. test before kpat => boom; test after kpat => success)
  
  easy fix is forcefully setting a target dependency.
  
  the much nicer solution would be to build a temporary static library which
  can be used by the test and the application to build the respective
  binaries. this would also have the neat advantage of only compiling the
  cpp files once (currently they get built once for the test target
  and then again for the kpat target). alas, currently no time to test such
  an invasive change. the band-aid dependency will have to do for now.

REPOSITORY
  R410 KPatience

BRANCH
  master

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

AFFECTED FILES
  autotests/CMakeLists.txt

To: sitter, #kde_games
Cc: kde-games-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20190307/b173464c/attachment.html>


More information about the kde-games-devel mailing list