From faec8773a11212f7e795e30ff0b6f7df47c994a2 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 4 Jan 2022 20:45:06 +0100 Subject: [PATCH] iox-#841 Upgrade GTest/GMock to v1.10 --- CHANGELOG.md | 1 + .../0001-remove-werror-from-build-flags.patch | 13 ++++++-- cmake/googletest/googletest.cmake.in | 33 ++++++------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d564ace1bb..f8e78ed747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ - Make `cxx::string::capacity` a `static` method[\#979](https://github.com/eclipse-iceoryx/iceoryx/issues/979) - Restructure iceoryx tools [\#471](https://github.com/eclipse-iceoryx/iceoryx/issues/471) - Use cxx::expected for MemoryManager::getChunk [\#954](https://github.com/eclipse-iceoryx/iceoryx/pull/991) +- Upgrade GTest/GMock to v1.10 [\#841](https://github.com/eclipse-iceoryx/iceoryx/issues/841) **API Breaking Changes:** diff --git a/cmake/googletest/0001-remove-werror-from-build-flags.patch b/cmake/googletest/0001-remove-werror-from-build-flags.patch index e43dc69c57..2a08f5390e 100644 --- a/cmake/googletest/0001-remove-werror-from-build-flags.patch +++ b/cmake/googletest/0001-remove-werror-from-build-flags.patch @@ -1,8 +1,15 @@ --- /googletest/cmake/internal_utils.cmake +++ /googletest/cmake/internal_utils.cmake.new -@@ -99,7 +99,7 @@ - set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0") - set(cxx_no_rtti_flags "-GR-") +@@ -82,13 +82,13 @@ macro(config_compiler_and_linker) + # http://stackoverflow.com/questions/3232669 explains the issue. + set(cxx_base_flags "${cxx_base_flags} -wd4702") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- set(cxx_base_flags "-Wall -Wshadow -Werror -Wconversion") ++ set(cxx_base_flags "-Wall -Wshadow -Wconversion") + set(cxx_exception_flags "-fexceptions") + set(cxx_no_exception_flags "-fno-exceptions") + set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls") + set(cxx_no_rtti_flags "-fno-rtti") elseif (CMAKE_COMPILER_IS_GNUCXX) - set(cxx_base_flags "-Wall -Wshadow -Werror") + set(cxx_base_flags "-Wall -Wshadow") diff --git a/cmake/googletest/googletest.cmake.in b/cmake/googletest/googletest.cmake.in index c942922efd..93fb020130 100644 --- a/cmake/googletest/googletest.cmake.in +++ b/cmake/googletest/googletest.cmake.in @@ -19,26 +19,13 @@ cmake_minimum_required(VERSION 3.5) project(googletest-download NONE) include(ExternalProject) -if(WIN32) - ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-1.10.0 - SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/src" - BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - ) -else() - ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-1.8.1 - SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/src" - BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/build" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - ) -endif(WIN32) +ExternalProject_Add(googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG release-1.10.0 + SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/src" + BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/googletest/build" + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" +)