CMakeLists.txt 860 B

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