aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2016-12-12 21:18:00 +0100
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-13 15:09:57 -0800
commitf1cb2cfd493f1cc06ea5965c07334e502decdccc (patch)
tree662778b4e89cbbe89ed286c5628880eccfa2f22d /cmake
parent07328ab9371e93e0c25313bd1ac5f982f65bf971 (diff)
downloadpaludis-f1cb2cfd493f1cc06ea5965c07334e502decdccc.tar.gz
paludis-f1cb2cfd493f1cc06ea5965c07334e502decdccc.tar.xz
build: Use the imported target for linking to pthread
Our required cmake version is new enough (>=3.1) and usage of the imported target is recommended by cmake's documentation [1]. Furthermore, according to the docs THREADS_PREFER_PTHREAD_FLAG can only be used with the imported target. [1] https://cmake.org/cmake/help/v3.7/module/FindThreads.html
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/PaludisAddTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/PaludisAddTest.cmake b/cmake/modules/PaludisAddTest.cmake
index 104b2a9b3..09fde5008 100644
--- a/cmake/modules/PaludisAddTest.cmake
+++ b/cmake/modules/PaludisAddTest.cmake
@@ -30,7 +30,7 @@ function(paludis_add_test test_name)
libpaludis
libpaludisutil
${GTEST_BOTH_LIBRARIES}
- ${CMAKE_THREAD_LIBS_INIT}
+ Threads::Threads
${PAT_LINK_LIBRARIES})
endif()