Dakota Hawkins | 759ef7c | 2018-07-24 11:06:55 -0400 | [diff] [blame] | 1 | cmake_minimum_required(VERSION 2.8.8) |
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 | |
Dakota Hawkins | 759ef7c | 2018-07-24 11:06:55 -0400 | [diff] [blame] | 7 | project(googletest-distribution) |
| 8 | set(GOOGLETEST_VERSION 1.9.0) |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 9 | |
| 10 | enable_testing() |
| 11 | |
Matthew Woehlke | 0e8e0e0 | 2017-08-09 15:29:36 -0400 | [diff] [blame] | 12 | include(CMakeDependentOption) |
Dakota Hawkins | 759ef7c | 2018-07-24 11:06:55 -0400 | [diff] [blame] | 13 | include(GNUInstallDirs) |
Matthew Woehlke | 0e8e0e0 | 2017-08-09 15:29:36 -0400 | [diff] [blame] | 14 | |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 15 | #Note that googlemock target already builds googletest |
| 16 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) |
Stefano Soffia | aff0379 | 2017-12-01 12:48:46 +0100 | [diff] [blame] | 17 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) |
Matthew Woehlke | 9469fb6 | 2017-08-16 10:49:06 -0400 | [diff] [blame] | 18 | |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 19 | if(BUILD_GMOCK) |
| 20 | add_subdirectory( googlemock ) |
Stefano Soffia | aff0379 | 2017-12-01 12:48:46 +0100 | [diff] [blame] | 21 | else() |
Fábio Junqueira | 4a0b77f | 2015-11-11 18:29:41 -0200 | [diff] [blame] | 22 | add_subdirectory( googletest ) |
| 23 | endif() |