Skip to content

Commit

Permalink
Build sentry-native with CXX 14 since sentry-crashpad, one of its pos…
Browse files Browse the repository at this point in the history
…sible dependencies, exposes CXX 14 code on its headers.

This will be addressed in upstream sentry-native
getsentry/sentry-native#574
  • Loading branch information
ericriff committed Jul 12, 2021
1 parent 7fe58b2 commit be71521
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 4 deletions.
10 changes: 9 additions & 1 deletion recipes/sentry-native/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion recipes/sentry-native/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions recipes/sentry-native/all/patches/0.4.10-0002-CXX-14.patch
Original file line number Diff line number Diff line change
@@ -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)

14 changes: 14 additions & 0 deletions recipes/sentry-native/all/patches/0.4.7-0002-CXX-14.patch
Original file line number Diff line number Diff line change
@@ -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)

14 changes: 14 additions & 0 deletions recipes/sentry-native/all/patches/0.4.8-0002-CXX-14.patch
Original file line number Diff line number Diff line change
@@ -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)

14 changes: 14 additions & 0 deletions recipes/sentry-native/all/patches/0.4.9-0002-CXX-14.patch
Original file line number Diff line number Diff line change
@@ -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)

2 changes: 1 addition & 1 deletion recipes/sentry-native/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit be71521

Please sign in to comment.