Skip to content

Commit 0422ab4

Browse files
committed
Require GTest to be provided by the system
1 parent d8a930a commit 0422ab4

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44
[submodule "lib/args"]
55
path = lib/args
66
url = https://github.com/Taywee/args
7-
[submodule "lib/gtest"]
8-
path = lib/gtest
9-
url = https://github.com/google/googletest

lib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ if(NOT USE_SYSTEM_ARGS)
3838
endif()
3939

4040
# Google Test framework
41-
if(BUILD_TESTING AND NOT TARGET gtest)
42-
add_subdirectory(gtest EXCLUDE_FROM_ALL)
41+
if(BUILD_TESTING AND NOT TARGET GTest::gtest)
42+
find_package(GTest REQUIRED)
4343
endif()

lib/gtest

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ include(CTest)
44
set(CMAKE_CXX_STANDARD 11)
55

66
add_executable(test_zsutil test_zsutil.cpp)
7-
target_link_libraries(test_zsutil PRIVATE libzsync2 gtest cpr)
7+
target_link_libraries(test_zsutil PRIVATE libzsync2 GTest::gtest cpr)
88
add_test(NAME test_zsutil COMMAND test_zsutil)
99

1010
add_executable(test_zshash test_zshash.cpp)
11-
target_link_libraries(test_zshash PRIVATE libzsync2 gtest cpr)
11+
target_link_libraries(test_zshash PRIVATE libzsync2 GTest::gtest cpr)
1212
add_test(NAME test_zshash COMMAND test_zshash)

0 commit comments

Comments
 (0)