From 7b78c6b41b5fcf0ae43e56aed289edbcc546823a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 21 Mar 2022 20:28:26 -0400 Subject: ninja backend: do not fatally error on compdb failure We print a warning if a compilation database isn't successfully generated, which is good, because that gives some visibility in case the user really wanted to use the compdb. But warnings default to being fatal with --fatal-meson-warnings, which is not so good, because this isn't a very important warning at all, and we'd rather not error out in such cases when building works fine and a random bonus IDE feature doesn't work. Mark this particular warning as non-fatal. Fixes side issue in https://github.com/mesonbuild/wrapdb/pull/343#issuecomment-1074545609 --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index d3216b1..e0fdc93 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -606,7 +606,7 @@ class NinjaBackend(backends.Backend): with open(os.path.join(builddir, 'compile_commands.json'), 'wb') as f: f.write(jsondb) except Exception: - mlog.warning('Could not create compilation database.') + mlog.warning('Could not create compilation database.', fatal=False) # Get all generated headers. Any source file might need them so # we need to add an order dependency to them. -- cgit v1.1