Skip to content

Commit

Permalink
Compile with pthread on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
William Yang committed Feb 24, 2024
1 parent 5749af9 commit f2365ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ function(create_example_target target)
target_link_libraries(${target} PRIVATE getopt viterbi)
endfunction()

if(NOT WIN32)
find_package(Threads REQUIRED)
add_compile_options(-pthread)
link_libraries(Threads::Threads)
endif()

create_example_target(run_tests)
create_example_target(run_benchmark)
create_example_target(run_simple)
Expand Down

0 comments on commit f2365ae

Please sign in to comment.