github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/3rd_party/build_option_bak/CMakeList.txt-googletest (about) 1 cmake_minimum_required(VERSION 2.8.8) 2 3 add_definitions(-stdlib=libc++) 4 if (POLICY CMP0048) 5 cmake_policy(SET CMP0048 NEW) 6 endif (POLICY CMP0048) 7 8 project(googletest-distribution) 9 set(GOOGLETEST_VERSION 1.9.0) 10 11 enable_testing() 12 13 include(CMakeDependentOption) 14 include(GNUInstallDirs) 15 16 #Note that googlemock target already builds googletest 17 option(BUILD_GMOCK "Builds the googlemock subproject" ON) 18 option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) 19 20 if(BUILD_GMOCK) 21 add_subdirectory( googlemock ) 22 else() 23 add_subdirectory( googletest ) 24 endif()