]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | # Note: CMake support is community-based. The maintainers do not use CMake |
2 | # internally. | |
3 | ||
4 | cmake_minimum_required(VERSION 2.8.8) | |
5 | ||
6 | if (POLICY CMP0048) | |
7 | cmake_policy(SET CMP0048 NEW) | |
8 | endif (POLICY CMP0048) | |
9 | ||
10 | project(googletest-distribution) | |
11 | set(GOOGLETEST_VERSION 1.10.0) | |
12 | ||
13 | if (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() | |
17 | endif() | |
18 | ||
19 | enable_testing() | |
20 | ||
21 | include(CMakeDependentOption) | |
22 | include(GNUInstallDirs) | |
23 | ||
24 | #Note that googlemock target already builds googletest | |
25 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) | |
26 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) | |
27 | ||
28 | if(BUILD_GMOCK) | |
29 | add_subdirectory( googlemock ) | |
30 | else() | |
31 | add_subdirectory( googletest ) | |
32 | endif() |