blob: d77321165aeb414b616a71769c77f45882fc56d4 [file] [log] [blame]
Dakota Hawkins759ef7c2018-07-24 11:06:55 -04001cmake_minimum_required(VERSION 2.8.8)
Fábio Junqueira4a0b77f2015-11-11 18:29:41 -02002
Joel Laity568958e2017-08-03 15:50:45 +12003if (POLICY CMP0048)
Manuel VIVESb68f1e72017-08-02 21:03:13 -04004 cmake_policy(SET CMP0048 NEW)
Joel Laity568958e2017-08-03 15:50:45 +12005endif (POLICY CMP0048)
Manuel VIVESb68f1e72017-08-02 21:03:13 -04006
Dakota Hawkins759ef7c2018-07-24 11:06:55 -04007project(googletest-distribution)
8set(GOOGLETEST_VERSION 1.9.0)
Fábio Junqueira4a0b77f2015-11-11 18:29:41 -02009
10enable_testing()
11
Matthew Woehlke0e8e0e02017-08-09 15:29:36 -040012include(CMakeDependentOption)
Dakota Hawkins759ef7c2018-07-24 11:06:55 -040013include(GNUInstallDirs)
Matthew Woehlke0e8e0e02017-08-09 15:29:36 -040014
Fábio Junqueira4a0b77f2015-11-11 18:29:41 -020015#Note that googlemock target already builds googletest
16option(BUILD_GMOCK "Builds the googlemock subproject" ON)
Stefano Soffiaaff03792017-12-01 12:48:46 +010017option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
Matthew Woehlke9469fb62017-08-16 10:49:06 -040018
Fábio Junqueira4a0b77f2015-11-11 18:29:41 -020019if(BUILD_GMOCK)
20 add_subdirectory( googlemock )
Stefano Soffiaaff03792017-12-01 12:48:46 +010021else()
Fábio Junqueira4a0b77f2015-11-11 18:29:41 -020022 add_subdirectory( googletest )
23endif()