CMakeLists.txt 612 Bytes
Newer Older
1
cmake_minimum_required(VERSION 2.8.8)
2
add_definitions(-std=c++11)
Fábio Junqueira's avatar
Fábio Junqueira committed
3

Joel Laity's avatar
Joel Laity committed
4
if (POLICY CMP0048)
5
  cmake_policy(SET CMP0048 NEW)
Joel Laity's avatar
Joel Laity committed
6
endif (POLICY CMP0048)
7

8
9
project(googletest-distribution)
set(GOOGLETEST_VERSION 1.9.0)
Fábio Junqueira's avatar
Fábio Junqueira committed
10
11
12

enable_testing()

13
include(CMakeDependentOption)
14
include(GNUInstallDirs)
15

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

Fábio Junqueira's avatar
Fábio Junqueira committed
20
21
if(BUILD_GMOCK)
  add_subdirectory( googlemock )
Stefano Soffia's avatar
Stefano Soffia committed
22
else()
Fábio Junqueira's avatar
Fábio Junqueira committed
23
24
  add_subdirectory( googletest )
endif()