From a24ef280cc3a97736d5ef47fb7766825786d7a52 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 7 May 2020 12:41:40 +0200 Subject: [PATCH] meson.build: require GCC 8 or clang 5 Commit 60f957ed648 broken the GCC 7 build, but instead of working around missing C++17 features in old compilers, let's update the compiler version requirements. This commit raises the clang requirement to version 5 because this is the first version to support `constexpr` lambdas, to be used to `Dsd2Pcm.cxx`. --- doc/developer.rst | 2 +- doc/user.rst | 2 +- meson.build | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/developer.rst b/doc/developer.rst index 1bfb0d131..a534c0ec0 100644 --- a/doc/developer.rst +++ b/doc/developer.rst @@ -12,7 +12,7 @@ Code Style * indent with tabs (width 8) * don't write CPP when you can write C++: use inline functions and constexpr instead of macros * comment your code, document your APIs -* the code should be C++17 compliant, and must compile with :program:`GCC` 7 and :program:`clang` 4 +* the code should be C++17 compliant, and must compile with :program:`GCC` 8 and :program:`clang` 5 * all code must be exception-safe * classes and functions names use CamelCase; variables are lower-case with words separated by underscore diff --git a/doc/user.rst b/doc/user.rst index 1b64b3fe9..38f33cc90 100644 --- a/doc/user.rst +++ b/doc/user.rst @@ -53,7 +53,7 @@ Download the source tarball from the `MPD home page `_ and In any case, you need: -* a C++14 compiler (e.g. GCC 7 or clang 4) +* a C++14 compiler (e.g. GCC 8 or clang 5) * `Meson 0.49.0 `__ and `Ninja `__ * Boost 1.58 diff --git a/meson.build b/meson.build index e78693ace..085b97bbc 100644 --- a/meson.build +++ b/meson.build @@ -15,10 +15,10 @@ version_cxx = vcs_tag(input: 'src/GitVersion.cxx', output: 'GitVersion.cxx') compiler = meson.get_compiler('cpp') c_compiler = meson.get_compiler('c') -if compiler.get_id() == 'gcc' and compiler.version().version_compare('<7') - warning('Your GCC version is too old. You need at least version 7.') -elif compiler.get_id() == 'clang' and compiler.version().version_compare('<4') - warning('Your clang version is too old. You need at least version 4.') +if compiler.get_id() == 'gcc' and compiler.version().version_compare('<8') + warning('Your GCC version is too old. You need at least version 8.') +elif compiler.get_id() == 'clang' and compiler.version().version_compare('<5') + warning('Your clang version is too old. You need at least version 5.') endif version_conf = configuration_data()