Skip to content
Commit 2486cfa6 authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

fix parallel building by forcing correct dependency order

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

Reviewers: #kde_games, aacid

Reviewed By: aacid

Subscribers: jriddell, shlomif, kde-games-devel

Differential Revision: https://phabricator.kde.org/D19590
parent aa6c9bfa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment