Skip to content

Link ptest binaries with pthread #809

Closed

Description

@yeshengm

I want to run folly test files, I execute cmake -D BUILD_TESTS=ON .. and then make, which yields a linking error. I wonder whether it is necessary to add a pthread in the linking stage. I tried to add the following line in CMakeList.txt#L392, and it compiles:

  target_link_libraries(folly_test_support
    PUBLIC
      ${BOOST_LIBRARIES}
      follybenchmark
      folly
      ${LIBGMOCK_LIBRARIES}
      ${CMAKE_THREAD_LIBS_INIT}
  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions