1cmake_minimum_required(VERSION 2.8.8) 2 3if (POLICY CMP0048) 4 cmake_policy(SET CMP0048 NEW) 5endif (POLICY CMP0048) 6 7project(googletest-distribution) 8set(GOOGLETEST_VERSION 1.9.0) 9 10enable_testing() 11 12include(CMakeDependentOption) 13include(GNUInstallDirs) 14 15#Note that googlemock target already builds googletest 16option(BUILD_GMOCK "Builds the googlemock subproject" ON) 17option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) 18 19if(BUILD_GMOCK) 20 add_subdirectory( googlemock ) 21else() 22 add_subdirectory( googletest ) 23endif() 24