Skip to content

Commit

Permalink
Add thread support to match default gtest compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovic Mussier committed Oct 20, 2016
1 parent 03d7d3e commit 695ca5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set(CMAKE_PREFIX_PATH ${GTEST_ROOT_DIR})

find_package(GTest REQUIRED)
find_package(Threads REQUIRED)

#Use our public headers like anyone else
include_directories(${GTEST_INCLUDE_DIRS})
Expand All @@ -14,6 +15,6 @@ set( SRCS

add_executable(MyLib_test ${SRCS})

target_link_libraries(MyLib_test ${GTEST_BOTH_LIBRARIES} myLibShared)
target_link_libraries(MyLib_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} myLibShared)

add_test(MyLib_test MyLib_test)

0 comments on commit 695ca5d

Please sign in to comment.