termux-packages/packages/libprotozero/tests_log.patch

34 lines
1.2 KiB
Diff

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c769123..79d4c87 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -56,6 +56,7 @@ set(TEST_DIRS alignment
string(REGEX REPLACE "([^;]+)" "t/\\1/reader_test_cases.cpp" _test_sources "${TEST_DIRS}")
add_executable(reader_tests reader_tests.cpp ${_test_sources})
+target_link_libraries(reader_tests log)
add_test(NAME reader_tests COMMAND reader_tests)
@@ -98,7 +99,7 @@ if(PROTOBUF_FOUND)
add_executable(writer_tests writer_tests.cpp ${SOURCES} ${PROTO_SRCS} ${PROTO_HDRS})
- target_link_libraries(writer_tests ${PROTOBUF_LITE_LIBRARY})
+ target_link_libraries(writer_tests ${PROTOBUF_LITE_LIBRARY} log)
if(NOT MSVC)
set_target_properties(writer_tests PROPERTIES COMPILE_FLAGS "-pthread")
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 0d1d75a..e91dfbf 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -18,6 +18,7 @@ set(UNIT_TESTS data_view
string(REGEX REPLACE "([^;]+)" "test_\\1.cpp" _test_sources "${UNIT_TESTS}")
add_executable(unit_tests main.cpp ${_test_sources})
+target_link_libraries(unit_tests log)
add_test(NAME unit_tests COMMAND unit_tests)