Enforce build order with qa system

The QA objects link to the direct kiface objects, which creates a second
dependency on the generated lexer files.  To ensure that the primary
apps are finished building them in a (potentially) different thread, we
set a false dependency on the final build product in the qa CMake.

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851

(cherry picked from commit 172542cfc4)
This commit is contained in:
Seth Hillbrand 2019-06-23 12:49:13 -07:00
parent f214cfae12
commit f265a52c96
3 changed files with 15 additions and 0 deletions

View File

@ -46,6 +46,11 @@ add_executable( qa_eeschema
test_eagle_plugin.cpp
)
# Anytime we link to the kiface_objects, we have to add a dependency on the last object
# to ensure that the generated lexer files are finished being used before the qa runs in a
# multi-threaded build
add_dependencies( qa_eeschema eeschema )
target_link_libraries( qa_eeschema
eeschema_kiface
common

View File

@ -54,6 +54,11 @@ add_executable( qa_pcbnew
$<TARGET_OBJECTS:pcbnew_kiface_objects>
)
# Anytime we link to the kiface_objects, we have to add a dependency on the last object
# to ensure that the generated lexer files are finished being used before the qa runs in a
# multi-threaded build
add_dependencies( qa_pcbnew pcbnew )
target_link_libraries( qa_pcbnew
qa_pcbnew_utils
3d-viewer

View File

@ -42,6 +42,11 @@ add_executable( qa_pcbnew_tools
$<TARGET_OBJECTS:pcbnew_kiface_objects>
)
# Anytime we link to the kiface_objects, we have to add a dependency on the last object
# to ensure that the generated lexer files are finished being used before the qa runs in a
# multi-threaded build
add_dependencies( qa_pcbnew_tools pcbnew )
target_link_libraries( qa_pcbnew_tools
qa_pcbnew_utils
3d-viewer