From 8112a8ade1064e0028ba2b65612c2dd95ac33dcd Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 13 Jun 2019 06:49:45 -0700 Subject: [PATCH] cmake: Further petting dependencies eeschema cpp files consume generated header files that have targets in the common directory, so no dependencies get created from eeschema. We add the dependencies in common to force the setting through libraries. Fixes: lp:1831643 * https://bugs.launchpad.net/kicad/+bug/1831643 --- CMakeModules/Functions.cmake | 4 ++-- common/CMakeLists.txt | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeModules/Functions.cmake b/CMakeModules/Functions.cmake index 056f0bc4a6..53c4c21e75 100644 --- a/CMakeModules/Functions.cmake +++ b/CMakeModules/Functions.cmake @@ -48,7 +48,7 @@ function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum ) ) add_custom_target( ${outputTarget} - DEPENDS ${inputFile} + DEPENDS ${outHeaderFile} ${outCppFile} ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake ) @@ -56,7 +56,7 @@ function( make_lexer outputTarget inputFile outHeaderFile outCppFile enum ) # are known to depend on the generated outHeader. foreach( extra_arg ${ARGN} ) set_source_files_properties( ${extra_arg} - PROPERTIES OBJECT_DEPENDS ${outputTarget} + PROPERTIES OBJECT_DEPENDS ${outHeaderFile} ) endforeach() diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 23cff68235..7c4bead754 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -549,6 +549,13 @@ make_lexer( ${PROJECT_SOURCE_DIR}/include/lib_table_lexer.h ${CMAKE_CURRENT_SOURCE_DIR}/lib_table_keywords.cpp LIB_TABLE_T + + # These files consume *_lexer.h + ${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/lib_table_base.cpp + ${PROJECT_SOURCE_DIR}/pcbnew/dialogs/panel_fp_lib_table.cpp + ${PROJECT_SOURCE_DIR}/eeschema/symbol_lib_table.cpp + ${PROJECT_SOURCE_DIR}/eeschema/dialogs/panel_sym_lib_table.cpp ) add_dependencies( common lib_table_lexer_source_files )