• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Note: CMake support is community-based. The maintainers do not use CMake
2# internally.
3
4cmake_minimum_required(VERSION 2.8.12)
5
6if (POLICY CMP0048)
7  cmake_policy(SET CMP0048 NEW)
8endif (POLICY CMP0048)
9
10project(googletest-distribution)
11set(GOOGLETEST_VERSION 1.10.0)
12
13if (CMAKE_VERSION VERSION_GREATER "3.0.2")
14  if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
15    set(CMAKE_CXX_EXTENSIONS OFF)
16  endif()
17endif()
18
19enable_testing()
20
21include(CMakeDependentOption)
22include(GNUInstallDirs)
23
24#Note that googlemock target already builds googletest
25option(BUILD_GMOCK "Builds the googlemock subproject" ON)
26option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
27
28if(BUILD_GMOCK)
29  add_subdirectory( googlemock )
30else()
31  add_subdirectory( googletest )
32endif()
33