on xenial help sign in
Serialize two make targets that want to cp to the same target file
commita311aa48577f652b06b5153d75f0eba4946c8520 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 31 Jan 2017, 14:35 (10 years ago) parent8a02dc2
1 file changed+6
tests/mocks/Unity/CMakeLists.txt+6
tests/mocks/Unity/CMakeLists.txt+6
@@ -73,3 +73,9 @@ add_unity8_mock(Unity 0.2 Unity TARGETS FakeUnityQml)
7373
7474# and one copy in a separate directory for autopilot
7575add_unity8_mock(Unity 0.2 Unity PREFIX scopefakes TARGETS FakeUnityQml)
76+
77+# Since on build both copy the same file to the same location (not great)
78+# make sure one depends on the other, otherwise when running with make -jX
79+# we can get errors of cp complaining the file has been created while it
80+# was trying to create it
81+add_dependencies(scopefakes-MockUnity-qmlfiles mocks-MockUnity-qmlfiles)