diff options
Diffstat (limited to 'dev-cpp/gtest/files')
6 files changed, 0 insertions, 209 deletions
diff --git a/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch b/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch deleted file mode 100644 index 40fa1f6668bc..000000000000 --- a/dev-cpp/gtest/files/gtest-1.8.0-fix-doublefree.patch +++ /dev/null @@ -1,98 +0,0 @@ -Bug: https://bugs.gentoo.org/631698 -Upstream PR: https://github.com/google/googletest/pull/1339 - -From 0663ce9024c9b78ddf6eb3fc1ceb45361ed91767 Mon Sep 17 00:00:00 2001 -From: Romain Geissler <romain.geissler@gmail.com> -Date: Sat, 2 Dec 2017 22:47:20 +0100 -Subject: [PATCH] Fix double free when building Gtest/GMock in shared libraries - and linking a test executable with both. - ---- - googlemock/CMakeLists.txt | 63 ++++++++++++++++++++++++++++++----------------- - 1 file changed, 40 insertions(+), 23 deletions(-) - -diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt -index 724fdd5f0..f7bad8afc 100644 ---- a/googlemock/CMakeLists.txt -+++ b/googlemock/CMakeLists.txt -@@ -86,16 +86,23 @@ endif() - # Google Mock libraries. We build them using more strict warnings than what - # are used for other targets, to ensure that Google Mock can be compiled by - # a user aggressive about warnings. --cxx_library(gmock -- "${cxx_strict}" -- "${gtest_dir}/src/gtest-all.cc" -- src/gmock-all.cc) -- --cxx_library(gmock_main -- "${cxx_strict}" -- "${gtest_dir}/src/gtest-all.cc" -- src/gmock-all.cc -- src/gmock_main.cc) -+if (MSVC) -+ cxx_library(gmock -+ "${cxx_strict}" -+ "${gtest_dir}/src/gtest-all.cc" -+ src/gmock-all.cc) -+ -+ cxx_library(gmock_main -+ "${cxx_strict}" -+ "${gtest_dir}/src/gtest-all.cc" -+ src/gmock-all.cc -+ src/gmock_main.cc) -+else() -+ cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) -+ target_link_libraries(gmock gtest) -+ cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) -+ target_link_libraries(gmock_main gmock) -+endif() - - # If the CMake version supports it, attach header directory information - # to the targets for when we are part of a parent build (ie being pulled -@@ -175,23 +182,33 @@ if (gmock_build_tests) - ############################################################ - # C++ tests built with non-standard compiler flags. - -- cxx_library(gmock_main_no_exception "${cxx_no_exception}" -- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) -- -- cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" -- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) -+ if (MSVC) -+ cxx_library(gmock_main_no_exception "${cxx_no_exception}" -+ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - -- if (NOT MSVC OR MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010. -- # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that -- # conflict with our own definitions. Therefore using our own tuple does not -- # work on those compilers. -- cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" -+ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - -- cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}" -- gmock_main_use_own_tuple test/gmock-spec-builders_test.cc) -+ if (MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010. -+ # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that -+ # conflict with our own definitions. Therefore using our own tuple does not -+ # work on those compilers. -+ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" -+ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) -+ -+ cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}" -+ gmock_main_use_own_tuple test/gmock-spec-builders_test.cc) -+ endif() -+ else() -+ cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc) -+ target_link_libraries(gmock_main_no_exception gmock) -+ -+ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc) -+ target_link_libraries(gmock_main_no_rtti gmock) -+ -+ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" src/gmock_main.cc) -+ target_link_libraries(gmock_main_use_own_tuple gmock) - endif() -- - cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" - gmock_main_no_exception test/gmock-more-actions_test.cc) - diff --git a/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch b/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch deleted file mode 100644 index eadfe6197389..000000000000 --- a/dev-cpp/gtest/files/gtest-1.8.0-fix-gcc6-undefined-behavior.patch +++ /dev/null @@ -1,21 +0,0 @@ -Fix build with GCC 6 due to lifetime issues. - ---- a/googletest/src/gtest.cc -+++ b/googletest/src/gtest.cc -@@ -2654,10 +2654,12 @@ - test->Run(); - } - -- // Deletes the test object. -- impl->os_stack_trace_getter()->UponLeavingGTest(); -- internal::HandleExceptionsInMethodIfSupported( -- test, &Test::DeleteSelf_, "the test fixture's destructor"); -+ if (test != NULL) { -+ // Deletes the test object. -+ impl->os_stack_trace_getter()->UponLeavingGTest(); -+ internal::HandleExceptionsInMethodIfSupported( -+ test, &Test::DeleteSelf_, "the test fixture's destructor"); -+ } - - result_.set_elapsed_time(internal::GetTimeInMillis() - start); - diff --git a/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch b/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch deleted file mode 100644 index 22ac0b6d4a12..000000000000 --- a/dev-cpp/gtest/files/gtest-1.8.0-increase-clone-stack-size.patch +++ /dev/null @@ -1,14 +0,0 @@ -Bug: https://bugs.gentoo.org/629620 -Upstream PR: https://github.com/google/googletest/pull/1274 - ---- a/googletest/src/gtest-death-test.cc -+++ b/googletest/src/gtest-death-test.cc -@@ -1070,7 +1070,7 @@ - - if (!use_fork) { - static const bool stack_grows_down = StackGrowsDown(); -- const size_t stack_size = getpagesize(); -+ const size_t stack_size = getpagesize() * 10; - // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. - void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); diff --git a/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch b/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch deleted file mode 100644 index c18b58e16fb6..000000000000 --- a/dev-cpp/gtest/files/gtest-1.8.0-multilib-strict.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/googlemock/CMakeLists.txt -+++ b/googlemock/CMakeLists.txt -@@ -11,6 +11,8 @@ - - option(gmock_build_tests "Build all of Google Mock's own tests." OFF) - -+set(LIB_INSTALL_DIR lib CACHE STRING "Library install directory") -+ - # A directory to find Google Test sources. - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt") - set(gtest_dir gtest) -@@ -104,7 +106,7 @@ - # - # Install rules - install(TARGETS gmock gmock_main -- DESTINATION lib) -+ DESTINATION ${LIB_INSTALL_DIR}) - install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock - DESTINATION include) - ---- a/googletest/CMakeLists.txt -+++ b/googletest/CMakeLists.txt -@@ -27,6 +27,8 @@ - "Build gtest with internal symbols hidden in shared libraries." - OFF) - -+set(LIB_INSTALL_DIR lib CACHE STRING "Library install directory") -+ - # Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build(). - include(cmake/hermetic_build.cmake OPTIONAL) - -@@ -103,7 +105,7 @@ - # - # Install rules - install(TARGETS gtest gtest_main -- DESTINATION lib) -+ DESTINATION ${LIB_INSTALL_DIR}) - install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest - DESTINATION include) - diff --git a/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch b/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch deleted file mode 100644 index 8dfed46d4585..000000000000 --- a/dev-cpp/gtest/files/gtest-9999-fix-gcc6-undefined-behavior.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix build with GCC 6 due to lifetime issues. - ---- a/googletest/src/gtest.cc -+++ b/googletest/src/gtest.cc -@@ -2693,10 +2693,12 @@ - test->Run(); - } - -+ if (test != NULL) { - // Deletes the test object. - impl->os_stack_trace_getter()->UponLeavingGTest(); - internal::HandleExceptionsInMethodIfSupported( - test, &Test::DeleteSelf_, "the test fixture's destructor"); -+ } - - result_.set_elapsed_time(internal::GetTimeInMillis() - start); - diff --git a/dev-cpp/gtest/files/gtest-9999-fix-py-tests.patch b/dev-cpp/gtest/files/gtest-9999-fix-py-tests.patch deleted file mode 100644 index ba63c7b3eeb3..000000000000 --- a/dev-cpp/gtest/files/gtest-9999-fix-py-tests.patch +++ /dev/null @@ -1,19 +0,0 @@ -Fix python tests that use broken generator expressions - ---- a/googletest/cmake/internal_utils.cmake -+++ b/googletest/cmake/internal_utils.cmake -@@ -247,12 +247,12 @@ - add_test( - NAME ${name} - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py -- --build_dir=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>) -+ --build_dir=${CMAKE_CURRENT_BINARY_DIR}) - else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1) - add_test( - ${name} - ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py -- --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE}) -+ --build_dir=${CMAKE_CURRENT_BINARY_DIR}) - endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.1) - endif() - endfunction() |