From a03124d889858d9b08ae328c88ce410e5c359fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Mon, 21 Mar 2022 11:33:17 -0400 Subject: [PATCH] build: use C++17 --- CMakeLists.txt | 4 ++-- README.md | 10 +++++----- configure.ac | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c6c0bfc..bc971857 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ include(FindPkgConfig) include(cmake/CheckAtomic.cmake) set (opendht_VERSION_MAJOR 2) -set (opendht_VERSION_MINOR 3.5) +set (opendht_VERSION_MINOR 4.0) set (opendht_VERSION ${opendht_VERSION_MAJOR}.${opendht_VERSION_MINOR}) set (PACKAGE_VERSION ${opendht_VERSION}) set (VERSION "${opendht_VERSION}") @@ -124,7 +124,7 @@ if (OPENDHT_HTTP OR OPENDHT_PEER_DISCOVERY) endif() # Build flags -set (CMAKE_CXX_STANDARD 14) +set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED on) if (NOT MSVC) diff --git a/README.md b/README.md index c8aa7a64..7ca8c674 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ <a id="user-content-opendht-" class="anchor" href="/savoirfairelinux/opendht/blob/master/README.md#opendht-" aria-hidden="true"></a>OpenDHT </h1> -A lightweight C++14 Distributed Hash Table implementation. +A lightweight C++17 Distributed Hash Table implementation. OpenDHT provides an easy to use distributed in-memory data store. Every node in the network can read and write values to the store. @@ -14,7 +14,7 @@ Values are distributed over the network, with redundancy. * High resilience to network disruption * Public key cryptography layer providing optional data signature and encryption (using GnuTLS) * IPv4 and IPv6 support - * Clean and powerful **C++14** map API + * Clean and powerful **C++17** map API * Bindings for **C, Rust & Python 3** * REST API with optional HTTP client+server with push notification support @@ -27,7 +27,7 @@ Build instructions: <https://github.com/savoirfairelinux/opendht/wiki/Build-the- #### How-to build a simple client app ```bash -g++ main.cpp -std=c++14 -lopendht +g++ main.cpp -std=c++17 -lopendht ``` ## Examples @@ -98,8 +98,8 @@ for r in results: - Nettle 2.4+, a GnuTLS dependency for crypto. - (optional) restinio used for the REST API. - (optional) jsoncpp 1.7.4-3+, used for the REST API. -- Build tested with GCC 5.2+ (GNU/Linux, Windows with MinGW), Clang/LLVM (GNU/Linux, Android, macOS, iOS). -- Build tested with Microsoft Visual Studio 2015, 2017, 2019 +- Build tested with GCC 7+ (GNU/Linux, Windows with MinGW), Clang/LLVM (GNU/Linux, Android, macOS, iOS). +- Build tested with Microsoft Visual Studio 2017, 2019, 2021 ## Contact diff --git a/configure.ac b/configure.ac index 71eeee4f..1e006df7 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl define macros m4_define([opendht_major_version], 2) -m4_define([opendht_minor_version], 3) -m4_define([opendht_patch_version], 5) +m4_define([opendht_minor_version], 4) +m4_define([opendht_patch_version], 0) m4_define([opendht_version], [opendht_major_version.opendht_minor_version.opendht_patch_version]) @@ -102,7 +102,7 @@ AS_IF([test "x$SYS" = "xandroid"], LT_INIT() LT_LANG(C++) -AX_CXX_COMPILE_STDCXX(14,[noext],[mandatory]) +AX_CXX_COMPILE_STDCXX(17,[noext],[mandatory]) PKG_PROG_PKG_CONFIG() -- GitLab