Skip to content

Commit d58789f

Browse files
committed
gtest update
1 parent a6bdbd5 commit d58789f

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if(${BUILD_EXAMPLES})
9191
endif()
9292

9393
# Tests --------------------------------------------------------------
94-
# if(${BUILD_GTESTS})
95-
# message(STATUS "building unix tests")
96-
# add_subdirectory(test)
97-
# endif()
94+
if(${BUILD_GTESTS})
95+
message(STATUS "building unix tests")
96+
add_subdirectory(test)
97+
endif()

test/CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,10 @@ include(FetchContent)
22

33
# GTest -----------------
44
FetchContent_Declare(gtest
5-
GIT_REPOSITORY "https://github.com/google/googletest"
6-
GIT_TAG "origin/main"
7-
SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest"
5+
GIT_REPOSITORY https://github.com/google/googletest.git
6+
GIT_TAG v1.15.2 # or another tag/branch
87
)
9-
# set(EXAMPLES OFF CACHE INTERNAL "Dont build examples")
108
FetchContent_MakeAvailable(gtest)
11-
if(gtest_POPULATED)
12-
message(STATUS "=> Found gtest")
13-
else()
14-
message(STATUS "*** Didn't find gtest")
15-
endif()
169

1710
enable_testing()
1811

0 commit comments

Comments
 (0)