diff options
author | Ben <benwaffle@users.noreply.github.com> | 2017-08-01 11:22:17 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-01 06:22:17 -0400 |
commit | 0ed0bcce4902db366d74a52794f7e71e73a47d41 (patch) | |
tree | 335c48f0816a45f8abf7ebc8e7203d86182507e4 /mesonbuild/compilers/vala.py | |
parent | ece4ce887242b572d7d27bc72497d007b2b75fdc (diff) | |
download | meson-0ed0bcce4902db366d74a52794f7e71e73a47d41.zip meson-0ed0bcce4902db366d74a52794f7e71e73a47d41.tar.gz meson-0ed0bcce4902db366d74a52794f7e71e73a47d41.tar.bz2 |
Vala: enable colored warning and error output (#2142)
Diffstat (limited to 'mesonbuild/compilers/vala.py')
-rw-r--r-- | mesonbuild/compilers/vala.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers/vala.py b/mesonbuild/compilers/vala.py index 21c040c..9da9b81 100644 --- a/mesonbuild/compilers/vala.py +++ b/mesonbuild/compilers/vala.py @@ -15,7 +15,7 @@ import os.path from .. import mlog -from ..mesonlib import EnvironmentException +from ..mesonlib import EnvironmentException, version_compare from .compilers import Compiler @@ -26,6 +26,7 @@ class ValaCompiler(Compiler): self.version = version self.id = 'valac' self.is_cross = False + self.base_options = ['b_colorout'] def name_string(self): return ' '.join(self.exelist) @@ -54,6 +55,11 @@ class ValaCompiler(Compiler): def get_werror_args(self): return ['--fatal-warnings'] + def get_colorout_args(self, colortype): + if version_compare(self.version, '>=0.37.1'): + return ['--color=' + colortype] + return [] + def sanity_check(self, work_dir, environment): code = 'class MesonSanityCheck : Object { }' args = self.get_cross_extra_flags(environment, link=False) |