CMakeLists.txt 936 Bytes
Newer Older
1
# Note: CMake support is community-based. The maintainers do not use CMake
misterg's avatar
misterg committed
2
3
# internally.

Abseil Team's avatar
Abseil Team committed
4
cmake_minimum_required(VERSION 3.5)
peter's avatar
peter committed
5

6
7
8
9
if (POLICY CMP0048)
  cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)

10
11
12
13
if (POLICY CMP0077)
  cmake_policy(SET CMP0077 NEW)
endif (POLICY CMP0077)

Robert Adam's avatar
Robert Adam committed
14
15
16
17
if (POLICY CMP0069)
  cmake_policy(SET CMP0069 NEW)
endif (POLICY CMP0069)

18
project(googletest-distribution)
Abseil Team's avatar
Abseil Team committed
19
set(GOOGLETEST_VERSION 1.11.0)
20

Abseil Team's avatar
Abseil Team committed
21
22
if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
  set(CMAKE_CXX_EXTENSIONS OFF)
peter's avatar
peter committed
23
endif()
Fábio Junqueira's avatar
Fábio Junqueira committed
24
25
26

enable_testing()

27
include(CMakeDependentOption)
28
include(GNUInstallDirs)
29

Fábio Junqueira's avatar
Fábio Junqueira committed
30
31
#Note that googlemock target already builds googletest
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
Stefano Soffia's avatar
Stefano Soffia committed
32
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
33

Fábio Junqueira's avatar
Fábio Junqueira committed
34
35
if(BUILD_GMOCK)
  add_subdirectory( googlemock )
Stefano Soffia's avatar
Stefano Soffia committed
36
else()
Fábio Junqueira's avatar
Fábio Junqueira committed
37
38
  add_subdirectory( googletest )
endif()