Skip to content

Commit

Permalink
DTNN-653 Functional test cmake fix 9
Browse files Browse the repository at this point in the history
  • Loading branch information
sara-gb committed Aug 6, 2024
1 parent b35086b commit dc5390c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,14 @@ if (IS_PIC)
endif()

# Set the standard compile options for all submodules (c99, full warnings)
foreach(COMPONENT ${BPLIB_COMPONENTS} bplib)
foreach(COMPONENT ${BPLIB_COMPONENTS})
target_compile_features(${COMPONENT} PRIVATE c_std_99)
target_compile_options(${COMPONENT} PRIVATE ${BPLIB_COMMON_COMPILE_OPTIONS})
endforeach()

target_compile_features(bplib PRIVATE c_std_99)
target_compile_options(bplib PRIVATE ${BPLIB_COMMON_COMPILE_OPTIONS})

# Internal/private header files exist within the implementation directories
target_include_directories(bplib PRIVATE ${BPLIB_PRIVATE_INCLUDE_DIRS})

Expand All @@ -220,7 +223,7 @@ if (BPLIB_ENABLE_UNIT_TESTS)
endforeach()

if (NOT IS_CFS_ARCH_BUILD)
# add_subdirectory(ut-functional)
add_subdirectory(ut-functional)
endif (NOT IS_CFS_ARCH_BUILD)

endif (BPLIB_ENABLE_UNIT_TESTS)
12 changes: 7 additions & 5 deletions ut-functional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#
##################################################################

set(CMAKE_VERBOSE_MAKEFILE ON)

# Add executable
add_executable(functional-bplib_sanity-testrunner
sanity-test.c
Expand All @@ -15,11 +17,11 @@ add_executable(functional-bplib_sanity-testrunner
#target_compile_features(functional-bplib_sanity-testrunner PUBLIC c_std_99)
#target_compile_options(functional-bplib_sanity-testrunner PUBLIC ${BPLIB_COMMON_COMPILE_OPTIONS})

# target_link_libraries(functional-bplib_sanity-testrunner PUBLIC
# # bplib
# # ut_assert
# # osal
# )
target_link_libraries(functional-bplib_sanity-testrunner PUBLIC
bplib
# ut_assert
# osal
)

add_test(functional-bplib_sanity-testrunner functional-bplib_sanity-testrunner)

Expand Down
2 changes: 1 addition & 1 deletion ut-functional/sanity-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// #include <utstubs.h>
// #include <uttest.h>

//#include "bplib.h"
#include "bplib.h"

void UtTest_Setup(void)
{
Expand Down

0 comments on commit dc5390c

Please sign in to comment.