Craig Scott | c0059a7 | 2016-01-01 11:01:15 +1100 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.6.4) |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 2 | |
Joel Laity | 568958e | 2017-08-03 15:50:45 +1200 | [diff] [blame^] | 3 | if (POLICY CMP0048) |
Manuel VIVES | b68f1e7 | 2017-08-02 21:03:13 -0400 | [diff] [blame] | 4 | cmake_policy(SET CMP0048 NEW) |
Joel Laity | 568958e | 2017-08-03 15:50:45 +1200 | [diff] [blame^] | 5 | endif (POLICY CMP0048) |
Manuel VIVES | b68f1e7 | 2017-08-02 21:03:13 -0400 | [diff] [blame] | 6 | |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 7 | project( googletest-distribution ) |
| 8 | |
| 9 | enable_testing() |
| 10 | |
| 11 | option(BUILD_GTEST "Builds the googletest subproject" OFF) |
| 12 | |
| 13 | #Note that googlemock target already builds googletest |
| 14 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) |
| 15 | |
| 16 | if(BUILD_GMOCK) |
| 17 | add_subdirectory( googlemock ) |
| 18 | elseif(BUILD_GTEST) |
| 19 | add_subdirectory( googletest ) |
| 20 | endif() |