Fix parallel build failures

Parallel builds sometimes fail with the following error:

    eeschema/sch_plugins/kicad/sch_sexpr_parser.h:36:10: fatal error: schematic_lexer.h: No such file or directory

This can be reproduced by running the following in an empty build
subdirectory:

    cmake .. -G Ninja -DWHATEVER_IS_NEEDED...
    ninja qa/schematic_utils/libqa_schematic_utils.a

We fix this by adding explicit dependency between qa_schematic_utils
and eeschema_kiface_objects, which builds schematic_lexer.h.
This commit is contained in:
Michal Sojka 2022-09-23 23:33:17 +02:00 committed by Mark Roszko
parent d0ff90eb6e
commit f7c82e2469
1 changed files with 5 additions and 1 deletions

View File

@ -55,4 +55,8 @@ set_source_files_properties( schematic_file_util.cpp PROPERTIES
target_include_directories( qa_schematic_utils PRIVATE
$<TARGET_PROPERTY:eeschema_kiface_objects,INTERFACE_INCLUDE_DIRECTORIES>
)
)
# Ensure that schematic_lexer.h, which needs to be included, is
# created before building this
add_dependencies( qa_schematic_utils eeschema_kiface_objects)