diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-05-14 23:54:34 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-05-15 02:09:33 +0000 |
commit | f2d0551941d4131b8a5b9d3320b27d1333b24034 (patch) | |
tree | 1d1720150087a88a5837fa111b96af955c5933d5 /mesonbuild/cmake | |
parent | 66f3ba9fd0fd19c4ebf94ce3873723a83046f4b5 (diff) | |
download | meson-f2d0551941d4131b8a5b9d3320b27d1333b24034.zip meson-f2d0551941d4131b8a5b9d3320b27d1333b24034.tar.gz meson-f2d0551941d4131b8a5b9d3320b27d1333b24034.tar.bz2 |
cmake: Print supported stds when warning
This was helpful while debugging CI failure on the 0.54 branch due to
a difference in the structure of self.env.coredata.compiler_options:
https://github.com/mesonbuild/meson/runs/674391139
https://travis-ci.org/github/mesonbuild/meson/jobs/686982807
Diffstat (limited to 'mesonbuild/cmake')
-rw-r--r-- | mesonbuild/cmake/interpreter.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 1e033c7..35eb17c 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -290,10 +290,12 @@ class ConverterTarget: m = ConverterTarget.std_regex.match(j) if m: std = m.group(2) - if std not in self._all_lang_stds(i): + supported = self._all_lang_stds(i) + if std not in supported: mlog.warning( 'Unknown {0}_std "{1}" -> Ignoring. Try setting the project-' - 'level {0}_std if build errors occur.'.format(i, std), + 'level {0}_std if build errors occur. Known ' + '{0}_stds are: {2}'.format(i, std, ' '.join(supported)), once=True ) continue |