aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-10-15 21:18:39 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-10-15 21:18:39 +0300
commitc5788548d225b1cf5561244e24da8a8cd6d7f488 (patch)
tree5f74376bbca727dd2e6cc399d50770f9856a2d8a /interpreter.py
parentdf979ad422709bc61d9bb05d49e0803b6f745efd (diff)
downloadmeson-c5788548d225b1cf5561244e24da8a8cd6d7f488.zip
meson-c5788548d225b1cf5561244e24da8a8cd6d7f488.tar.gz
meson-c5788548d225b1cf5561244e24da8a8cd6d7f488.tar.bz2
Can check for Meson version in project definition.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/interpreter.py b/interpreter.py
index b9f91c4..914caa1 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1269,6 +1269,11 @@ class Interpreter():
if not self.is_subproject() and 'subproject_dir' in kwargs:
self.subproject_dir = kwargs['subproject_dir']
+ if 'meson_version' in kwargs:
+ cv = coredata.version
+ pv = kwargs['meson_version']
+ if not mesonlib.version_compare(cv, pv):
+ raise InterpreterException('Meson version is %s but project requires %s.' % (cv, pv))
self.build.projects[self.subproject] = args[0]
mlog.log('Project name: ', mlog.bold(args[0]), sep='')
self.add_languages(node, args[1:])