aboutsummaryrefslogtreecommitdiffstats
path: root/src/Compiler.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-26 13:29:44 +0100
committerMax Kellermann <max@duempel.org>2014-12-26 13:31:03 +0100
commit6b4ac669629d7adf821700ae9284b057dd1907d8 (patch)
treeba47130a35bde0d51e433070faa2ecdc814f3202 /src/Compiler.h
parent0964b06240947e94fc2732107815fff41856d481 (diff)
downloadmpd-6b4ac669629d7adf821700ae9284b057dd1907d8.tar.gz
mpd-6b4ac669629d7adf821700ae9284b057dd1907d8.tar.xz
mpd-6b4ac669629d7adf821700ae9284b057dd1907d8.zip
Compiler.h: add macro CLANG_CHECK_VERSION()
Diffstat (limited to 'src/Compiler.h')
-rw-r--r--src/Compiler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Compiler.h b/src/Compiler.h
index 82a192394..b736b5ac7 100644
--- a/src/Compiler.h
+++ b/src/Compiler.h
@@ -52,6 +52,13 @@
# warning Untested compiler. Use at your own risk!
#endif
+/**
+ * Are we building with the specified version of clang or newer?
+ */
+#define CLANG_CHECK_VERSION(major, minor) \
+ (defined(__clang__) && \
+ CLANG_VERSION >= GCC_MAKE_VERSION(major, minor, 0))
+
#if GCC_CHECK_VERSION(4,0)
/* GCC 4.x */