CMakeLists.txt 844 B

1234567891011121314151617181920212223242526272829303132
  1. # Note: CMake support is community-based. The maintainers do not use CMake
  2. # internally.
  3. cmake_minimum_required(VERSION 2.8.12)
  4. if (POLICY CMP0048)
  5. cmake_policy(SET CMP0048 NEW)
  6. endif (POLICY CMP0048)
  7. project(googletest-distribution)
  8. set(GOOGLETEST_VERSION 1.11.0)
  9. if (CMAKE_VERSION VERSION_GREATER "3.0.2")
  10. if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
  11. set(CMAKE_CXX_EXTENSIONS OFF)
  12. endif()
  13. endif()
  14. enable_testing()
  15. include(CMakeDependentOption)
  16. include(GNUInstallDirs)
  17. #Note that googlemock target already builds googletest
  18. option(BUILD_GMOCK "Builds the googlemock subproject" ON)
  19. option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
  20. if(BUILD_GMOCK)
  21. add_subdirectory( googlemock )
  22. else()
  23. add_subdirectory( googletest )
  24. endif()