googletest: switch to latest version 1.12.1 -> 1.13

This commit is contained in:
Matthias Grob 2023-02-16 13:40:15 +01:00
parent 91364ba901
commit da0e40c72b
2 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@ project(googletest-download NONE)
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(googletest ExternalProject_Add(googletest
URL https://github.com/google/googletest/archive/58d77fa8070e8cec2dc1ed015d66b454c8d78850.zip # 1.12.1 URL https://github.com/google/googletest/archive/b796f7d44681514f58a683a3a71ff17c94edb0c1.zip # 1.13
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""

View File

@ -46,4 +46,7 @@ add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src ${CMAKE_CURRENT_BINA
get_target_property(GTEST_COMPILE_FLAGS gtest COMPILE_OPTIONS) get_target_property(GTEST_COMPILE_FLAGS gtest COMPILE_OPTIONS)
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-include") list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-include")
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "visibility.h") list(REMOVE_ITEM GTEST_COMPILE_FLAGS "visibility.h")
# Remove float warnings added by PX4 which trigger in gtest-printers.h
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-Wdouble-promotion")
list(REMOVE_ITEM GTEST_COMPILE_FLAGS "-Wfloat-equal")
set_target_properties(gtest PROPERTIES COMPILE_OPTIONS "${GTEST_COMPILE_FLAGS}") set_target_properties(gtest PROPERTIES COMPILE_OPTIONS "${GTEST_COMPILE_FLAGS}")