summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2022-07-12 22:28:24 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2022-08-22 22:14:40 -0400
commit2d3219a143b5dae0fe85a7c2ceae72fab8c66864 (patch)
treef711312eb8674f3e7524f0ac0b102e01efbb88b3 /debian
parent73fdf3fb48dd390f4c517c11eac0fc68d3f07388 (diff)
Build in C++17 mode
Debian 12’s GCC will default to C++17, so start building Abseil in C++17 mode. To maximize compatibility, continue to treat absl::any, absl::optional, absl::string_view, and absl::variant as distinct types rather than aliases for C++17 types in the std namespace.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules6
-rwxr-xr-xdebian/tests/cmake2
2 files changed, 4 insertions, 4 deletions
diff --git a/debian/rules b/debian/rules
index 536ca72a..0584fd92 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,11 +34,11 @@ override_dh_auto_clean:
$(RM) -r $(CURDIR)/shared
override_dh_auto_configure:
- dh_auto_configure -Bstatic -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=OFF
+ dh_auto_configure -Bstatic -- -DCMAKE_CXX_STANDARD=17 -DBUILD_SHARED_LIBS=OFF
ifeq ($(ABSL_RUN_TESTS),ON)
- dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DABSL_USE_GOOGLETEST_HEAD=OFF
+ dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=17 -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DABSL_USE_GOOGLETEST_HEAD=OFF
else
- dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS=ON
+ dh_auto_configure -Bshared -- -DCMAKE_CXX_STANDARD=17 -DBUILD_SHARED_LIBS=ON
endif
override_dh_auto_build:
diff --git a/debian/tests/cmake b/debian/tests/cmake
index 1eb04de9..43eb3408 100755
--- a/debian/tests/cmake
+++ b/debian/tests/cmake
@@ -32,7 +32,7 @@ EOF
cat >CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 3.5)
project(test CXX)
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
add_executable(test test.cc)
find_package(absl REQUIRED)
target_link_libraries(test absl::strings)