Skip to content

Commit

Permalink
Link tests against libpthread
Browse files Browse the repository at this point in the history
  • Loading branch information
magiblot committed Jan 24, 2024
1 parent 2f5aa47 commit f71a08e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ if (TURBO_BUILD_TESTS)
${GTEST}
${GTEST_MAIN}
)

if (NOT WIN32)
find_library(PTHREAD pthread REQUIRED)
tv_message(STATUS "Found 'pthread': ${PTHREAD}")
target_link_libraries(${TURBO}-test PRIVATE
${PTHREAD}
)
endif()

add_custom_command(
OUTPUT ${TURBO}-test-passed
COMMAND ${TURBO}-test
Expand Down

0 comments on commit f71a08e

Please sign in to comment.