diff --git a/ade-use-cxx14-standard.patch b/ade-use-cxx14-standard.patch new file mode 100644 index 0000000..a2997ed --- /dev/null +++ b/ade-use-cxx14-standard.patch @@ -0,0 +1,17 @@ +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ade-0.1.2d/CMakeLists.txt +=================================================================== +--- ade-0.1.2d.orig/CMakeLists.txt ++++ ade-0.1.2d/CMakeLists.txt +@@ -18,7 +18,7 @@ option(FORCE_ADE_ASSERTS "Always e + option(BUILD_ADE_DOCUMENTATION "Build doxygen documentation" OFF) + option(BUILD_WITH_STATIC_CRT "Build with static multi-threaded C Runtime (MS Windows/Visual Studio only)" OFF) + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 14) + + # TODO: this is horrible hack, we must follow cmake + # build/install policy diff --git a/ade.changes b/ade.changes index be4842a..ed364c7 100644 --- a/ade.changes +++ b/ade.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 25 08:16:19 UTC 2024 - Atri Bhattacharya + +- Add ade-use-cxx14-standard.patch: Enforce CMAKE_CXX_STANDARD=14 + to allow building tests with gtest >= 1.14.0 (gh#opencv/ade#44). + ------------------------------------------------------------------- Mon Jan 1 01:17:53 UTC 2024 - Stefan BrĂ¼ns diff --git a/ade.spec b/ade.spec index c3c56df..ca87e99 100644 --- a/ade.spec +++ b/ade.spec @@ -1,7 +1,7 @@ # # spec file for package ade # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,8 @@ License: Apache-2.0 Group: Development/Libraries/C and C++ URL: https://opencv.org/ Source0: https://github.com/opencv/ade/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM ade-use-cxx14-standard.patch gh#opencv/ade#44 badshah400@gmail.com -- Enforce CMAKE_CXX_STANDARD=14 to allow building tests with gtest >= 1.14.0 +Patch0: ade-use-cxx14-standard.patch BuildRequires: c++_compiler BuildRequires: cmake > 3.2 %if %{with tests} @@ -52,15 +54,18 @@ A graph construction, manipulation, and processing framework. It is suitable for organizing data flow processing and execution. %prep -%setup -q +%autosetup -p1 # fixup library install directory (i.e. use CMake default) sed -i -e 's@ DESTINATION lib@ DESTINATION ${CMAKE_INSTALL_LIBDIR}@' sources/ade/CMakeLists.txt %build +# c++14 is required, at a minimum, for gtest to build tests %cmake \ %{?with_tutorials:-DBUILD_ADE_TUTORIAL=ON} \ %{?with_docs:-DBUILD_ADE_DOCUMENTATION=ON} \ - %{?with_tests:-DGTEST_ROOT:PATH=%{_prefix} -DENABLE_ADE_TESTING=ON} \ + %{?with_tests:-DGTEST_ROOT:PATH=%{_prefix} \ + -DENABLE_ADE_TESTING=ON} \ + %{nil} %cmake_build