Skip to content

Commit cd1b9f1

Browse files
committed
tests : add pthread to test-wer for freebds
This commit adds pthread to the test-wer target for FreeBSD. This is necessary to avoid the following error: ```console [68%] Linking CXX executable ../bin/test-wer ld: error: undefined reference due to --no-allow-shlib-undefined: pthread_create >>> referenced by ../src/libwhisper.so.1.7.4 c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [tests/CMakeFiles/test-wer.dir/build.make:106: bin/test-wer] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1421: tests/CMakeFiles/test-wer.dir/all] Error 2 ``` Refs: https://github.com/ggerganov/whisper.cpp/actions/runs/14218829646/job/39841747819
1 parent 0a28600 commit cd1b9f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ if (WHISPER_FFMPEG)
8585
set_tests_properties(${TEST_TARGET} PROPERTIES LABELS "tiny;mp3")
8686
endif()
8787

88+
find_package(Threads REQUIRED)
89+
8890
# WER Unit Test
8991
add_executable(test-wer test-wer.cpp)
9092
target_include_directories(test-wer PRIVATE ../examples)
91-
target_link_libraries(test-wer PRIVATE common)
93+
target_link_libraries(test-wer PRIVATE common ${CMAKE_THREAD_LIBS_INIT})
9294
add_test(NAME test-wer COMMAND test-wer)
9395
set_tests_properties(test-wer PROPERTIES LABELS "unit")

0 commit comments

Comments
 (0)