mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Manually patch gtest to allow CMake version 2.8.12...3.19.1
Fixes #3355. Works around https://github.com/google/googletest/issues/3040.
This commit is contained in:
parent
abd2a54522
commit
037b928dd7
|
@ -556,6 +556,15 @@ if(NOT(GTEST_FOUND) AND DOWNLOAD_GTEST)
|
|||
message(WARNING "Build step for googletest failed: ${result}")
|
||||
set(DOWNLOAD_GTEST OFF)
|
||||
else()
|
||||
file(GLOB_RECURSE DDNET_GTEST_CMAKELISTS ${CMAKE_BINARY_DIR}/googletest-src/CMakeLists.txt)
|
||||
foreach(file ${DDNET_GTEST_CMAKELISTS})
|
||||
file(READ ${file} CONTENTS)
|
||||
string(REPLACE "cmake_minimum_required(VERSION 2.6.4)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}")
|
||||
string(REPLACE "cmake_minimum_required(VERSION 2.6.4)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}")
|
||||
string(REPLACE "cmake_minimum_required(VERSION 2.8.8)" "cmake_minimum_required(VERSION 2.8.12...3.19.1)" CONTENTS "${CONTENTS}")
|
||||
file(WRITE ${file} "${CONTENTS}")
|
||||
endforeach()
|
||||
|
||||
# Prevent overriding the parent project's compiler/linker settings on Windows
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
|
Loading…
Reference in a new issue