Googletest export
Bump `cmake_minimum_required` to 3.5. Delete conditional branches exclusive to older versions. Notable dependents: - github.com/grpc/grpc >= 3.5.1 - github.com/abseil/abseil-cpp >= 3.5 - github.com/googleapis/google-cloud-cpp >= 3.5 On the other hand, github.com/protocolbuffers/protobuf is >= 3.1.3, but it only depends on GoogleTest 1.10. Fixes #3523 PiperOrigin-RevId: 392073834
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
# Note: CMake support is community-based. The maintainers do not use CMake
 | 
					# Note: CMake support is community-based. The maintainers do not use CMake
 | 
				
			||||||
# internally.
 | 
					# internally.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cmake_minimum_required(VERSION 2.8.12)
 | 
					cmake_minimum_required(VERSION 3.5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (POLICY CMP0048)
 | 
					if (POLICY CMP0048)
 | 
				
			||||||
  cmake_policy(SET CMP0048 NEW)
 | 
					  cmake_policy(SET CMP0048 NEW)
 | 
				
			||||||
@@ -10,10 +10,8 @@ endif (POLICY CMP0048)
 | 
				
			|||||||
project(googletest-distribution)
 | 
					project(googletest-distribution)
 | 
				
			||||||
set(GOOGLETEST_VERSION 1.11.0)
 | 
					set(GOOGLETEST_VERSION 1.11.0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (CMAKE_VERSION VERSION_GREATER "3.0.2")
 | 
					if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
 | 
				
			||||||
  if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
 | 
					 | 
				
			||||||
  set(CMAKE_CXX_EXTENSIONS OFF)
 | 
					  set(CMAKE_CXX_EXTENSIONS OFF)
 | 
				
			||||||
  endif()
 | 
					 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enable_testing()
 | 
					enable_testing()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,13 +36,9 @@ endif()
 | 
				
			|||||||
# as ${gmock_SOURCE_DIR} and to the root binary directory as
 | 
					# as ${gmock_SOURCE_DIR} and to the root binary directory as
 | 
				
			||||||
# ${gmock_BINARY_DIR}.
 | 
					# ${gmock_BINARY_DIR}.
 | 
				
			||||||
# Language "C" is required for find_package(Threads).
 | 
					# Language "C" is required for find_package(Threads).
 | 
				
			||||||
if (CMAKE_VERSION VERSION_LESS 3.0)
 | 
					cmake_minimum_required(VERSION 3.5)
 | 
				
			||||||
  project(gmock CXX C)
 | 
					cmake_policy(SET CMP0048 NEW)
 | 
				
			||||||
else()
 | 
					project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
 | 
				
			||||||
  cmake_policy(SET CMP0048 NEW)
 | 
					 | 
				
			||||||
  project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
cmake_minimum_required(VERSION 2.8.12)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (COMMAND set_up_hermetic_build)
 | 
					if (COMMAND set_up_hermetic_build)
 | 
				
			||||||
  set_up_hermetic_build()
 | 
					  set_up_hermetic_build()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,14 +46,9 @@ endif()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Project version:
 | 
					# Project version:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (CMAKE_VERSION VERSION_LESS 3.0)
 | 
					cmake_minimum_required(VERSION 3.5)
 | 
				
			||||||
  project(gtest CXX C)
 | 
					cmake_policy(SET CMP0048 NEW)
 | 
				
			||||||
  set(PROJECT_VERSION ${GOOGLETEST_VERSION})
 | 
					project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
 | 
				
			||||||
else()
 | 
					 | 
				
			||||||
  cmake_policy(SET CMP0048 NEW)
 | 
					 | 
				
			||||||
  project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
cmake_minimum_required(VERSION 2.8.12)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (POLICY CMP0063) # Visibility
 | 
					if (POLICY CMP0063) # Visibility
 | 
				
			||||||
  cmake_policy(SET CMP0063 NEW)
 | 
					  cmake_policy(SET CMP0063 NEW)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user