From 87750c064edcfd7198b00624d84b0f994f9e0b03 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Sun, 23 Oct 2022 14:52:59 +0200 Subject: [PATCH] build: Bump C++ to C++17 Now requires gcc8 or clang7 --- .clang-format | 2 +- CHANGELOG.md | 1 + cmake/cxx.cmake | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index 4d561f89..2f6dfaf4 100644 --- a/.clang-format +++ b/.clang-format @@ -1,6 +1,6 @@ --- Language: Cpp -Standard: Cpp11 +Standard: c++17 BasedOnStyle: Google ColumnLimit: 120 NamespaceIndentation: All diff --git a/CHANGELOG.md b/CHANGELOG.md index 8845bc23..a901db9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Build - Respect `CMAKE_INSTALL_PREFIX` when installing default config ([`#2770`](https://github.com/polybar/polybar/pull/2770)) +- Bump C++ version to C++17 ([`#2847`](https://github.com/polybar/polybar/pull/2847)) ### Deprecated - `custom/text`: The `content` setting and all its properties are deprecated in favor of `format` with the same functionality. ([`#2676`](https://github.com/polybar/polybar/pull/2676)) diff --git a/cmake/cxx.cmake b/cmake/cxx.cmake index f9b3db45..7caa5cda 100644 --- a/cmake/cxx.cmake +++ b/cmake/cxx.cmake @@ -15,13 +15,12 @@ endif() option(CXXLIB_CLANG "Link against libc++" OFF) option(CXXLIB_GCC "Link against stdlibc++" OFF) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(THREADS_PREFER_PTHREAD_FLAG ON) - set(POLYBAR_FLAGS "" CACHE STRING "C++ compiler flags used for compiling polybar") list(APPEND cxx_base -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor)