1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Tue, 3 Aug 2021 15:03:22 +0200
Subject: Use system Googletest
Forwarded: not-needed
---
Source/CMakeLists.txt | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 89a1d00..f0949f6 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -105,22 +105,8 @@ endif()
# - - - - - - - - - - - - - - - - - -
# Unit testing
if(${ASTCENC_UNITTEST})
- set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
- set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
- add_subdirectory(GoogleTest)
-
- # Workaround GoogleTest CRT selection issue issue
- # See https://github.com/google/googletest/issues/4067
- set_property(
- TARGET gtest
- PROPERTY
- MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
-
- set_property(
- TARGET gtest_main
- PROPERTY
- MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
-
+ find_package(GTest REQUIRED)
+ add_library(gtest_main ALIAS GTest::gtest_main)
enable_testing()
add_subdirectory(UnitTest)
endif()
|