abseil: ensure clients must use C++17
This commit is contained in:
67
mingw-w64-abseil-cpp/0004-abseil-Propagate-cxx-std-17.patch
Normal file
67
mingw-w64-abseil-cpp/0004-abseil-Propagate-cxx-std-17.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
--- abseil-cpp-20211102.0/CMake/AbseilHelpers.cmake.orig 2021-11-03 16:26:14.000000000 +0100
|
||||
+++ abseil-cpp-20211102.0/CMake/AbseilHelpers.cmake 2022-06-01 16:55:00.896155100 +0200
|
||||
@@ -258,7 +258,7 @@
|
||||
# Abseil libraries require C++11 as the current minimum standard.
|
||||
# Top-level application CMake projects should ensure a consistent C++
|
||||
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
|
||||
- target_compile_features(${_NAME} PUBLIC cxx_std_11)
|
||||
+ target_compile_features(${_NAME} PUBLIC cxx_std_17)
|
||||
else()
|
||||
# Note: This is legacy (before CMake 3.8) behavior. Setting the
|
||||
# target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
|
||||
@@ -306,7 +306,7 @@
|
||||
# Abseil libraries require C++11 as the current minimum standard.
|
||||
# Top-level application CMake projects should ensure a consistent C++
|
||||
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
|
||||
- target_compile_features(${_NAME} INTERFACE cxx_std_11)
|
||||
+ target_compile_features(${_NAME} INTERFACE cxx_std_17)
|
||||
|
||||
# (INTERFACE libraries can't have the CXX_STANDARD property set, so there
|
||||
# is no legacy behavior else case).
|
||||
@@ -418,7 +418,7 @@
|
||||
# Abseil libraries require C++11 as the current minimum standard.
|
||||
# Top-level application CMake projects should ensure a consistent C++
|
||||
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
|
||||
- target_compile_features(${_NAME} PUBLIC cxx_std_11)
|
||||
+ target_compile_features(${_NAME} PUBLIC cxx_std_17)
|
||||
else()
|
||||
# Note: This is legacy (before CMake 3.8) behavior. Setting the
|
||||
# target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
|
||||
--- abseil-cpp-20211102.0/absl/base/options.h.orig 2021-11-03 16:26:14.000000000 +0100
|
||||
+++ abseil-cpp-20211102.0/absl/base/options.h 2022-06-01 17:01:28.159314200 +0200
|
||||
@@ -100,7 +100,7 @@
|
||||
// User code should not inspect this macro. To check in the preprocessor if
|
||||
// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY.
|
||||
|
||||
-#define ABSL_OPTION_USE_STD_ANY 2
|
||||
+#define ABSL_OPTION_USE_STD_ANY 1
|
||||
|
||||
|
||||
// ABSL_OPTION_USE_STD_OPTIONAL
|
||||
@@ -127,7 +127,7 @@
|
||||
// absl::optional is a typedef of std::optional, use the feature macro
|
||||
// ABSL_USES_STD_OPTIONAL.
|
||||
|
||||
-#define ABSL_OPTION_USE_STD_OPTIONAL 2
|
||||
+#define ABSL_OPTION_USE_STD_OPTIONAL 1
|
||||
|
||||
|
||||
// ABSL_OPTION_USE_STD_STRING_VIEW
|
||||
@@ -154,7 +154,7 @@
|
||||
// absl::string_view is a typedef of std::string_view, use the feature macro
|
||||
// ABSL_USES_STD_STRING_VIEW.
|
||||
|
||||
-#define ABSL_OPTION_USE_STD_STRING_VIEW 2
|
||||
+#define ABSL_OPTION_USE_STD_STRING_VIEW 1
|
||||
|
||||
// ABSL_OPTION_USE_STD_VARIANT
|
||||
//
|
||||
@@ -180,7 +180,7 @@
|
||||
// absl::variant is a typedef of std::variant, use the feature macro
|
||||
// ABSL_USES_STD_VARIANT.
|
||||
|
||||
-#define ABSL_OPTION_USE_STD_VARIANT 2
|
||||
+#define ABSL_OPTION_USE_STD_VARIANT 1
|
||||
|
||||
|
||||
// ABSL_OPTION_USE_INLINE_NAMESPACE
|
||||
@@ -17,11 +17,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
source=("https://github.com/abseil/abseil-cpp/archive/$pkgver/$_realname-$pkgver.tar.gz"
|
||||
"0001-abseil-Fix-compiler-warnings.patch"
|
||||
"0002-abseil-Remove-librt-library.patch"
|
||||
"0003-abseil-Include-pthread-header.patch")
|
||||
"0003-abseil-Include-pthread-header.patch"
|
||||
"0004-abseil-Propagate-cxx-std-17.patch")
|
||||
sha256sums=('dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4'
|
||||
'd273d7fa05f912edc8d91c0c8ba6f1f0576d0d98714bc4bd9b624e148f7aad19'
|
||||
'd3ecabcebf64c2211b40e07f376de028ad1b101051cba7e69d77f6074217238d'
|
||||
'66bf9f2919aed3a4f71bba6b6809078dd6cb22faef763e63c3f813d3f54782c9')
|
||||
'66bf9f2919aed3a4f71bba6b6809078dd6cb22faef763e63c3f813d3f54782c9'
|
||||
'52cbf35dace3296dbe0f72acc2235cf009c0fffce8cf0fb455a99a71e5f25ab2')
|
||||
|
||||
prepare() {
|
||||
cd "${_realname}-${pkgver}"
|
||||
@@ -29,6 +31,7 @@ prepare() {
|
||||
patch -Np1 -i "${srcdir}/0001-abseil-Fix-compiler-warnings.patch"
|
||||
patch -Np1 -i "${srcdir}/0002-abseil-Remove-librt-library.patch"
|
||||
patch -Np1 -i "${srcdir}/0003-abseil-Include-pthread-header.patch"
|
||||
patch -Np1 -i "${srcdir}/0004-abseil-Propagate-cxx-std-17.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user