mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
25 lines
722 B
Diff
25 lines
722 B
Diff
--- CMakeLists.txt_orig 2025-10-16 17:31:07
|
|
+++ CMakeLists.txt 2025-10-16 17:31:59
|
|
@@ -96,12 +96,17 @@
|
|
if (PHMAP_BUILD_TESTS)
|
|
|
|
if (NOT PHMAP_GTEST_LIBS)
|
|
- include(cmake/DownloadGTest.cmake)
|
|
+ find_package(GTest CONFIG)
|
|
+ if (GTest_FOUND)
|
|
+ set(PHMAP_GTEST_LIBS GTest::gmock_main)
|
|
+ else()
|
|
+ include(cmake/DownloadGTest.cmake)
|
|
|
|
- check_target(gtest)
|
|
- check_target(gtest_main)
|
|
- check_target(gmock)
|
|
- set(PHMAP_GTEST_LIBS gmock_main)
|
|
+ check_target(gtest)
|
|
+ check_target(gtest_main)
|
|
+ check_target(gmock)
|
|
+ set(PHMAP_GTEST_LIBS gmock_main)
|
|
+ endif()
|
|
endif()
|
|
|
|
enable_testing()
|