aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-03 16:33:18 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-03 16:33:18 -0800
commite8ff6e6d14bbe6ad6c915d9669efc3893cfa06ba (patch)
treec59ac8a3d8c42a17119b5382d250f7b164b90f87
parente799bc4946d242266a1948425e3784553e5cb43d (diff)
downloadpaludis-e8ff6e6d14bbe6ad6c915d9669efc3893cfa06ba.tar.gz
paludis-e8ff6e6d14bbe6ad6c915d9669efc3893cfa06ba.tar.xz
build: explicitly link against threads in gtests
In the case the googletest library is built static and was built with threading, the library may have an implicit dependency which is unrecorded. Add an explicit link against the threading library. The slight overlinkage is inconsequential as it is for tests only.
-rw-r--r--cmake/modules/PaludisAddTest.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/modules/PaludisAddTest.cmake b/cmake/modules/PaludisAddTest.cmake
index cde8efbe1..104b2a9b3 100644
--- a/cmake/modules/PaludisAddTest.cmake
+++ b/cmake/modules/PaludisAddTest.cmake
@@ -30,6 +30,7 @@ function(paludis_add_test test_name)
libpaludis
libpaludisutil
${GTEST_BOTH_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
${PAT_LINK_LIBRARIES})
endif()