Skip to content

Commit 1758604

Browse files
William Yangwilliamyang98
William Yang
authored andcommitted
Compile with pthread on linux
1 parent 5749af9 commit 1758604

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ function(create_example_target target)
1717
target_link_libraries(${target} PRIVATE getopt viterbi)
1818
endfunction()
1919

20+
if(NOT WIN32)
21+
find_package(Threads REQUIRED)
22+
add_compile_options(-pthread)
23+
link_libraries(Threads::Threads)
24+
endif()
25+
2026
create_example_target(run_tests)
2127
create_example_target(run_benchmark)
2228
create_example_target(run_simple)

0 commit comments

Comments
 (0)