xref: /aosp_15_r20/external/libaom/third_party/googletest/src/CMakeLists.txt (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1# Note: CMake support is community-based. The maintainers do not use CMake
2# internally.
3
4cmake_minimum_required(VERSION 3.5)
5
6if (POLICY CMP0048)
7  cmake_policy(SET CMP0048 NEW)
8endif (POLICY CMP0048)
9
10if (POLICY CMP0077)
11  cmake_policy(SET CMP0077 NEW)
12endif (POLICY CMP0077)
13
14project(googletest-distribution)
15set(GOOGLETEST_VERSION 1.12.1)
16
17if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
18  set(CMAKE_CXX_EXTENSIONS OFF)
19endif()
20
21enable_testing()
22
23include(CMakeDependentOption)
24include(GNUInstallDirs)
25
26#Note that googlemock target already builds googletest
27option(BUILD_GMOCK "Builds the googlemock subproject" ON)
28option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
29
30if(BUILD_GMOCK)
31  add_subdirectory( googlemock )
32else()
33  add_subdirectory( googletest )
34endif()
35