CMakeLists.txt 819 B

123456789101112131415161718192021222324252627
  1. # Note: CMake support is community-based. The maintainers do not use CMake
  2. # internally.
  3. cmake_minimum_required(VERSION 3.13)
  4. project(googletest-distribution)
  5. set(GOOGLETEST_VERSION 1.14.0)
  6. if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
  7. set(CMAKE_CXX_EXTENSIONS OFF)
  8. endif()
  9. enable_testing()
  10. include(CMakeDependentOption)
  11. include(GNUInstallDirs)
  12. #Note that googlemock target already builds googletest
  13. option(BUILD_GMOCK "Builds the googlemock subproject" ON)
  14. option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
  15. option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF)
  16. if(BUILD_GMOCK)
  17. add_subdirectory( googlemock )
  18. else()
  19. add_subdirectory( googletest )
  20. endif()