summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-02 15:52:35 +0200
committerMax Kellermann <max@musicpd.org>2019-08-02 15:53:16 +0200
commite00464435bb80697f0fba06417a40275c9944dce (patch)
tree21c1fbb0436c00fa155b05d9110d939689961ac2 /meson.build
parentb81138bda1c6cb1b3d1fd8ecbf4174ac939b5f44 (diff)
util/Compiler.h: move compiler version checks to meson.build
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index dd4bef90d..6d35c5990 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,12 @@ 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('<6')
+ warning('Your GCC version is too old. You need at least version 6.')
+elif compiler.get_id() == 'clang' and compiler.version().version_compare('<3')
+ warning('Your clang version is too old. You need at least version 3.')
+endif
+
conf = configuration_data()
conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name())