summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-05-14 23:54:34 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-05-14 23:54:34 +0530
commitcbaa653f46872230ac8136ecb130a16e230e6a08 (patch)
tree08959391096a5ad373d1e4e981d76a4a0fbab110
parenta63e36f7b114d66f455936fa6621b30a3a54675f (diff)
downloadmeson-nirbheek/cmake-fix-std-check.tar.gz
cmake: Print supported stds when warningnirbheek/cmake-fix-std-check
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
-rw-r--r--mesonbuild/cmake/interpreter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index 1e033c76b..35eb17c49 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