diff options
author | 2016-12-12 21:18:00 +0100 | |
---|---|---|
committer | 2016-12-13 15:09:57 -0800 | |
commit | f1cb2cfd493f1cc06ea5965c07334e502decdccc (patch) | |
tree | 662778b4e89cbbe89ed286c5628880eccfa2f22d /cmake/modules | |
parent | 07328ab9371e93e0c25313bd1ac5f982f65bf971 (diff) | |
download | paludis-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/modules')
-rw-r--r-- | cmake/modules/PaludisAddTest.cmake | 2 |
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() |