aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2018-11-20 22:09:03 +0100
committerAvatar Heiko Becker <heirecka@exherbo.org> 2018-12-22 17:15:00 +0100
commit1606b0eecc9eb8e0c60fe34ff8d3671563a9ad35 (patch)
treedbca8de78aa256e25efcea2dff43dc6125ec37b1 /cmake
parente5882cddca2fc293fc4f74b15fa591b45ed682ad (diff)
downloadpaludis-1606b0eecc9eb8e0c60fe34ff8d3671563a9ad35.tar.gz
paludis-1606b0eecc9eb8e0c60fe34ff8d3671563a9ad35.tar.xz
build: Use imported targets for GTest
Raises the cmake requirement to 3.5.0 (released in March 2016) but we don't need to manually mess with INCLUDE_DIRS and linking to a thread library anymore.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/PaludisAddTest.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/modules/PaludisAddTest.cmake b/cmake/modules/PaludisAddTest.cmake
index 38362e4a9..684da49c8 100644
--- a/cmake/modules/PaludisAddTest.cmake
+++ b/cmake/modules/PaludisAddTest.cmake
@@ -22,15 +22,12 @@ function(paludis_add_test test_name)
"${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.cc")
endif()
if(PAT_GTEST)
- target_include_directories(${test_name}
- PRIVATE
- ${GTEST_INCLUDE_DIRS})
target_link_libraries(${test_name}
PRIVATE
libpaludis
libpaludisutil
- ${GTEST_BOTH_LIBRARIES}
- Threads::Threads
+ GTest::GTest
+ GTest::Main
${PAT_LINK_LIBRARIES})
endif()