You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
887 B

  1. # Note: CMake support is community-based. The maintainers do not use CMake
  2. # internally.
  3. cmake_minimum_required(VERSION 2.8.8)
  4. if (POLICY CMP0048)
  5. cmake_policy(SET CMP0048 NEW)
  6. endif (POLICY CMP0048)
  7. project(googletest-distribution)
  8. set(GOOGLETEST_VERSION 1.10.0)
  9. if (CMAKE_VERSION VERSION_LESS "3.1")
  10. add_definitions(-std=c++11)
  11. else()
  12. set(CMAKE_CXX_STANDARD 11)
  13. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  14. if(NOT CYGWIN)
  15. set(CMAKE_CXX_EXTENSIONS OFF)
  16. endif()
  17. endif()
  18. enable_testing()
  19. include(CMakeDependentOption)
  20. include(GNUInstallDirs)
  21. #Note that googlemock target already builds googletest
  22. option(BUILD_GMOCK "Builds the googlemock subproject" ON)
  23. option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
  24. if(BUILD_GMOCK)
  25. add_subdirectory( googlemock )
  26. else()
  27. add_subdirectory( googletest )
  28. endif()