Skip to content

Commit

Permalink
Fix #214, resolve build error with CFS and tests
Browse files Browse the repository at this point in the history
Do not build the sanity checks when part of a CFS build, as this does
not link properly due to the different linking environment.  The sanity
checks only work in a standalone bplib build.
  • Loading branch information
jphickey committed Nov 22, 2022
1 parent d4c6db9 commit b373cee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,10 @@ target_include_directories(bplib PUBLIC

if (BPLIB_ENABLE_UNIT_TESTS)
add_subdirectory(ut-stubs)
add_subdirectory(ut-functional)

# BPLib Sanity checks are only for standalone builds, sanity checks
# for CFE/CFS builds should be part of the BP app, as opposed to BPLib
if (NOT IS_CFS_ARCH_BUILD)
add_subdirectory(ut-functional)
endif (NOT IS_CFS_ARCH_BUILD)
endif (BPLIB_ENABLE_UNIT_TESTS)
8 changes: 7 additions & 1 deletion ut-functional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
# Add executable
add_executable(functional-bplib_sanity-testrunner
sanity-test.c

$<TARGET_OBJECTS:bplib_os>
$<TARGET_OBJECTS:bplib_common>
$<TARGET_OBJECTS:bplib_cache>
$<TARGET_OBJECTS:bplib_v7>
$<TARGET_OBJECTS:bplib_mpool>
$<TARGET_OBJECTS:bplib_base>
)

target_compile_features(functional-bplib_sanity-testrunner PUBLIC c_std_99)
Expand All @@ -24,7 +31,6 @@ target_include_directories(functional-bplib_sanity-testrunner PRIVATE
)

target_link_libraries(functional-bplib_sanity-testrunner PUBLIC
bplib
ut_assert
osal
)
Expand Down

0 comments on commit b373cee

Please sign in to comment.