fix parallel building by forcing correct dependency order
ClosedPublic

Authored by sitter on Mar 7 2019, 11:00 AM.

Details

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.

Test Plan

make -j96 doesn't result in error

Diff Detail

Repository
R410 KPatience
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Mar 7 2019, 11:00 AM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptMar 7 2019, 11:00 AM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
sitter requested review of this revision.Mar 7 2019, 11:00 AM
sitter edited the test plan for this revision. (Show Details)Mar 7 2019, 11:01 AM
sitter added a reviewer: aacid.
sitter added subscribers: shlomif, jriddell.
aacid accepted this revision.Mar 7 2019, 10:47 PM
This revision is now accepted and ready to land.Mar 7 2019, 10:47 PM
This revision was automatically updated to reflect the committed changes.