From be71521d53dcd820f5196e3612c816e6933b9988 Mon Sep 17 00:00:00 2001 From: Eric Riff Date: Mon, 12 Jul 2021 15:53:44 -0300 Subject: [PATCH] Build sentry-native with CXX 14 since sentry-crashpad, one of its possible dependencies, exposes CXX 14 code on its headers. This will be addressed in upstream sentry-native https://github.com/getsentry/sentry-native/issues/574 --- recipes/sentry-native/all/conandata.yml | 10 +++++++++- recipes/sentry-native/all/conanfile.py | 2 +- ... => 0.2.6-0002-set-cmake-cxx-standard-14.patch} | 2 +- .../all/patches/0.4.10-0002-CXX-14.patch | 14 ++++++++++++++ .../all/patches/0.4.7-0002-CXX-14.patch | 14 ++++++++++++++ .../all/patches/0.4.8-0002-CXX-14.patch | 14 ++++++++++++++ .../all/patches/0.4.9-0002-CXX-14.patch | 14 ++++++++++++++ .../sentry-native/all/test_package/CMakeLists.txt | 2 +- 8 files changed, 68 insertions(+), 4 deletions(-) rename recipes/sentry-native/all/patches/{0.2.6-0002-set-cmake-cxx-standard-11.patch => 0.2.6-0002-set-cmake-cxx-standard-14.patch} (91%) create mode 100644 recipes/sentry-native/all/patches/0.4.10-0002-CXX-14.patch create mode 100644 recipes/sentry-native/all/patches/0.4.7-0002-CXX-14.patch create mode 100644 recipes/sentry-native/all/patches/0.4.8-0002-CXX-14.patch create mode 100644 recipes/sentry-native/all/patches/0.4.9-0002-CXX-14.patch diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index cddf62ef025ab..2b0a952903a12 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -21,17 +21,25 @@ patches: "0.4.10": - patch_file: "patches/0.4.10-0001-find-conan-qt.patch" base_path: "source_subfolder" + - patch_file: "patches/0.4.10-0002-CXX-14.patch" + base_path: "source_subfolder" "0.4.9": - patch_file: "patches/0.4.9-0001-find-conan-qt.patch" base_path: "source_subfolder" + - patch_file: "patches/0.4.9-0002-CXX-14.patch" + base_path: "source_subfolder" "0.4.8": - patch_file: "patches/0.4.8-0001-find-conan-qt.patch" base_path: "source_subfolder" + - patch_file: "patches/0.4.8-0002-CXX-14.patch" + base_path: "source_subfolder" "0.4.7": - patch_file: "patches/0.4.7-0001-find-conan-qt.patch" base_path: "source_subfolder" + - patch_file: "patches/0.4.7-0002-CXX-14.patch" + base_path: "source_subfolder" "0.2.6": - patch_file: "patches/0.2.6-0001-remove-sentry-handler-dependency.patch" base_path: "source_subfolder" - - patch_file: "patches/0.2.6-0002-set-cmake-cxx-standard-11.patch" + - patch_file: "patches/0.2.6-0002-set-cmake-cxx-standard-14.patch" base_path: "source_subfolder" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index c7ff296c1cb8a..c0cd71c887829 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -67,7 +67,7 @@ def configure(self): if self.options.shared: del self.options.fPIC if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) + tools.check_min_cppstd(self, 14) if self.options.backend == "inproc" and self.settings.os == "Windows" and tools.Version(self.version) < "0.4": raise ConanInvalidConfiguration("The in-process backend is not supported on Windows") if self.options.backend != "crashpad": diff --git a/recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-11.patch b/recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-14.patch similarity index 91% rename from recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-11.patch rename to recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-14.patch index d062025163bb3..c6ec8ddfc9472 100644 --- a/recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-11.patch +++ b/recipes/sentry-native/all/patches/0.2.6-0002-set-cmake-cxx-standard-14.patch @@ -7,7 +7,7 @@ index c41d902..4793e9b 100644 endif() +if(NOT CMAKE_CXX_STANDARD) -+ set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) +endif() + include(GNUInstallDirs) diff --git a/recipes/sentry-native/all/patches/0.4.10-0002-CXX-14.patch b/recipes/sentry-native/all/patches/0.4.10-0002-CXX-14.patch new file mode 100644 index 0000000000000..34b3b00506093 --- /dev/null +++ b/recipes/sentry-native/all/patches/0.4.10-0002-CXX-14.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 696d270..006bf68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ + endif() + + if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + endif() + + include(GNUInstallDirs) + diff --git a/recipes/sentry-native/all/patches/0.4.7-0002-CXX-14.patch b/recipes/sentry-native/all/patches/0.4.7-0002-CXX-14.patch new file mode 100644 index 0000000000000..34b3b00506093 --- /dev/null +++ b/recipes/sentry-native/all/patches/0.4.7-0002-CXX-14.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 696d270..006bf68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ + endif() + + if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + endif() + + include(GNUInstallDirs) + diff --git a/recipes/sentry-native/all/patches/0.4.8-0002-CXX-14.patch b/recipes/sentry-native/all/patches/0.4.8-0002-CXX-14.patch new file mode 100644 index 0000000000000..34b3b00506093 --- /dev/null +++ b/recipes/sentry-native/all/patches/0.4.8-0002-CXX-14.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 696d270..006bf68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ + endif() + + if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + endif() + + include(GNUInstallDirs) + diff --git a/recipes/sentry-native/all/patches/0.4.9-0002-CXX-14.patch b/recipes/sentry-native/all/patches/0.4.9-0002-CXX-14.patch new file mode 100644 index 0000000000000..34b3b00506093 --- /dev/null +++ b/recipes/sentry-native/all/patches/0.4.9-0002-CXX-14.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 696d270..006bf68 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ + endif() + + if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + endif() + + include(GNUInstallDirs) + diff --git a/recipes/sentry-native/all/test_package/CMakeLists.txt b/recipes/sentry-native/all/test_package/CMakeLists.txt index 142b41397dd63..2f94c645a3640 100644 --- a/recipes/sentry-native/all/test_package/CMakeLists.txt +++ b/recipes/sentry-native/all/test_package/CMakeLists.txt @@ -8,4 +8,4 @@ find_package(sentry REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} sentry::sentry) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)