Skip to content

Commit

Permalink
Fix nasa#2421, adjust dependencies on table lib
Browse files Browse the repository at this point in the history
Instead of having the intermediate table library build as part of the "all"
target, attach it as a dependency under the custom rule.  This way it will
only be built in the context of the cfetables top level target, not
both.
  • Loading branch information
jphickey committed Aug 9, 2023
1 parent 8852743 commit 56e1539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES)

# Add a custom target to generate the config file
add_custom_target(generate_table_${TGT}_${APP_NAME}_${TABLE_BASENAME}
DEPENDS "${TABLE_RULEFILE}"
DEPENDS "${TABLE_RULEFILE}" ${TABLE_LIBNAME}
)
add_dependencies(cfetables generate_table_${TGT}_${APP_NAME}_${TABLE_BASENAME})

Expand All @@ -335,7 +335,7 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES)
# On older versions one may not reference the TARGET_OBJECTS property from the custom command.
# As a workaround this is built into a static library, and then the desired object is extracted
# before passing to elf2cfetbl. It is roundabout but it works.
add_library(${TABLE_LIBNAME} STATIC ${TABLE_SELECTED_SRCS})
add_library(${TABLE_LIBNAME} STATIC EXCLUDE_FROM_ALL ${TABLE_SELECTED_SRCS})
target_compile_definitions(${TABLE_LIBNAME} PRIVATE
CFE_CPU_NAME=${TGT}
)
Expand Down

0 comments on commit 56e1539

Please sign in to comment.