forked from vesoft-inc/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindGoogletest.cmake
30 lines (26 loc) · 901 Bytes
/
FindGoogletest.cmake
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
# - Try to find Googletest includes dirs and libraries
#
# Usage of this module as follows:
#
# find_package(Googletest)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# Variables defined by this module:
#
# Googletest_FOUND System has Googletest, include and lib dirs found
# Googletest_INCLUDE_DIR The Googletest includes directories.
# Googletest_LIBRARY The Googletest library.
find_path(Googletest_INCLUDE_DIR NAMES gmock gtest)
find_library(Googletest_LIBRARY NAMES libgmock.a libgmock_main.a libgtest.a libgtest_main.a)
if(Googletest_INCLUDE_DIR AND Googletest_LIBRARY)
set(Googletest_FOUND TRUE)
mark_as_advanced(
Googletest_INCLUDE_DIR
Googletest_LIBRARY
)
endif()
if(NOT Googletest_FOUND)
message(FATAL_ERROR "Googletest doesn't exist")
endif()