From: TizenOpenSource Date: Mon, 22 Jan 2024 04:19:57 +0000 (+0900) Subject: Bump to 1.14.0 X-Git-Tag: accepted/tizen/unified/20240318.071444~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgtest.git;a=commitdiff_plain;h=04f648ce70e2e21da9dfe0f127b10f48b3936904 Bump to 1.14.0 Signed-off-by: TizenOpenSource --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fede02f..0000000 --- a/.gitignore +++ /dev/null @@ -1,88 +0,0 @@ -# Ignore CI build directory -build/ -xcuserdata -cmake-build-debug/ -.idea/ -bazel-bin -bazel-genfiles -bazel-googletest -bazel-out -bazel-testlogs -# python -*.pyc - -# Visual Studio files -.vs -*.sdf -*.opensdf -*.VC.opendb -*.suo -*.user -_ReSharper.Caches/ -Win32-Debug/ -Win32-Release/ -x64-Debug/ -x64-Release/ - -# VSCode files -.cache/ -cmake-variants.yaml - -# Ignore autoconf / automake files -Makefile.in -aclocal.m4 -configure -build-aux/ -autom4te.cache/ -googletest/m4/libtool.m4 -googletest/m4/ltoptions.m4 -googletest/m4/ltsugar.m4 -googletest/m4/ltversion.m4 -googletest/m4/lt~obsolete.m4 -googlemock/m4 - -# Ignore generated directories. -googlemock/fused-src/ -googletest/fused-src/ - -# macOS files -.DS_Store -googletest/.DS_Store -googletest/xcode/.DS_Store - -# Ignore cmake generated directories and files. -CMakeFiles -CTestTestfile.cmake -Makefile -cmake_install.cmake -googlemock/CMakeFiles -googlemock/CTestTestfile.cmake -googlemock/Makefile -googlemock/cmake_install.cmake -googlemock/gtest -/bin -/googlemock/gmock.dir -/googlemock/gmock_main.dir -/googlemock/RUN_TESTS.vcxproj.filters -/googlemock/RUN_TESTS.vcxproj -/googlemock/INSTALL.vcxproj.filters -/googlemock/INSTALL.vcxproj -/googlemock/gmock_main.vcxproj.filters -/googlemock/gmock_main.vcxproj -/googlemock/gmock.vcxproj.filters -/googlemock/gmock.vcxproj -/googlemock/gmock.sln -/googlemock/ALL_BUILD.vcxproj.filters -/googlemock/ALL_BUILD.vcxproj -/lib -/Win32 -/ZERO_CHECK.vcxproj.filters -/ZERO_CHECK.vcxproj -/RUN_TESTS.vcxproj.filters -/RUN_TESTS.vcxproj -/INSTALL.vcxproj.filters -/INSTALL.vcxproj -/googletest-distribution.sln -/CMakeCache.txt -/ALL_BUILD.vcxproj.filters -/ALL_BUILD.vcxproj diff --git a/packaging/Fix-build-error-at-cmake.patch b/packaging/Fix-build-error-at-cmake.patch new file mode 100644 index 0000000..7527041 --- /dev/null +++ b/packaging/Fix-build-error-at-cmake.patch @@ -0,0 +1,32 @@ +From 41039ce0cef643f44cf91ee11ca55b90c7f78a53 Mon Sep 17 00:00:00 2001 +From: DongHun Kwak +Date: Mon, 17 Jan 2022 13:58:08 +0900 +Subject: [PATCH] Fix build error at cmake 3.21.3 + +armv7l-tizen-linux-gnueabi/bin/ld: cannot find -lThreads::Threads + +Change-Id: Ib59af537a100c2d182cd66ab58057de5ec82d4af +--- + googletest/cmake/internal_utils.cmake | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 8d8d60a..98a052e 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -184,11 +184,7 @@ function(cxx_library_with_type name type cxx_flags) + endif() + endif() + if (DEFINED GTEST_HAS_PTHREAD) +- if ("${CMAKE_VERSION}" VERSION_LESS "3.1.0") +- set(threads_spec ${CMAKE_THREAD_LIBS_INIT}) +- else() +- set(threads_spec Threads::Threads) +- endif() ++ set(threads_spec ${CMAKE_THREAD_LIBS_INIT}) + target_link_libraries(${name} PUBLIC ${threads_spec}) + endif() + +-- +2.25.1 + diff --git a/packaging/gtest.manifest b/packaging/gtest.manifest new file mode 100644 index 0000000..86dbb26 --- /dev/null +++ b/packaging/gtest.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/gtest.spec b/packaging/gtest.spec new file mode 100644 index 0000000..904a5bf --- /dev/null +++ b/packaging/gtest.spec @@ -0,0 +1,97 @@ +Name: gtest +Summary: Google C++ Testing Framework +Version: 1.14.0 +Release: 0 + +# ========================================================== +License: BSD-3-Clause +# ========================================================== + +Group: Definition/Libraries/C and C++ +Source0: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: cmake +Provides: libgtest_main.so.0 libgtest.so.0 +Provides: libgmock_main.so.0 libgmock.so.0 + +%description +Google's framework for writing C++ tests on a variety of platforms (Linux, Mac +OS X, Windows, Cygwin, Windows CE, and Symbian). Based on the xUnit +architecture. Supports automatic test discovery, a rich set of assertions, +user-defined assertions, death tests, fatal and non-fatal failures, value- and +type-parameterized tests, various options for running the tests, and XML test +report generation. + + +%package devel +Summary: Google C++ Testing Framework +Requires: %{name} = %{version} + +%description devel +Google C++ Testing Framework + + +%prep +%setup -q +cp %{SOURCE1001} . + +# ========================================================== +# build section +# how to actually build the software we are packaging +# ========================================================== +%build +mkdir -p build +pushd build +%{cmake} .. +%{__make} %{?_smp_mflags} +popd + + +# ========================================================== +# install section +# how to actually build the software we are packaging +# ========================================================== +%install +pushd build +%{make_install} +popd + +rm -f %{buildroot}/%{_includedir}/gmock/internal/custom/README.md +rm -f %{buildroot}/%{_includedir}/gtest/internal/custom/README.md + +%clean + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +# ========================================================== +# files section +# The list of files that will be installed in the end +# user’s system. +# ========================================================== +%files +%manifest %{name}.manifest +%license LICENSE +%{_libdir}/*.so.* +%{_libdir}/*.so + +%files devel +%manifest %{name}.manifest +%license LICENSE +%{_libdir}/pkgconfig/gtest_main.pc +%{_libdir}/pkgconfig/gtest.pc +%{_libdir}/pkgconfig/gmock_main.pc +%{_libdir}/pkgconfig/gmock.pc +%{_includedir}/gmock/*.h +%{_includedir}/gmock/internal/*.h +%{_includedir}/gmock/internal/custom/*.h +%{_includedir}/gtest/*.h +%{_includedir}/gtest/internal/*.h +%{_includedir}/gtest/internal/custom/*.h +%{_libdir}/cmake/GTest/*.cmake