Skip to content

Commit 18457c9

Browse files
authored
Fix gtest found condition
`GTest_Found` will be defined in the former `Find(GTest)`; no need to assert if this variable is not defined.
1 parent d47f698 commit 18457c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ IF (BUILD_TESTING)
226226
find_package(Threads)
227227
set(CMAKE_CXX_STANDARD_REQUIRED ON)
228228
find_package(GTest HINTS /usr/local/lib/ ${GTEST_DIR})
229-
if(NOT DEFINED GTest_FOUND)
229+
if(NOT ${GTest_FOUND})
230230
include(FetchContent)
231231
FetchContent_Declare(
232232
googletest

0 commit comments

Comments
 (0)