Do not error out if compdb can not be created.

pull/987/head
Jussi Pakkanen 8 years ago
parent 69aa0091b1
commit 72995b5800
  1. 6
      mesonbuild/backend/ninjabackend.py

@ -212,10 +212,10 @@ int dummy;
builddir = self.environment.get_build_dir()
try:
jsondb = subprocess.check_output([ninja_exe, '-t', 'compdb', 'c_COMPILER', 'cpp_COMPILER'], cwd=builddir)
with open(os.path.join(builddir, 'compile_commands.json'), 'wb') as f:
f.write(jsondb)
except Exception:
raise MesonException('Could not create compilation database.')
with open(os.path.join(builddir, 'compile_commands.json'), 'wb') as f:
f.write(jsondb)
mlog.log(mlog.red('Warning:', 'Could not create compilation database.'))
# Get all generated headers. Any source file might need them so
# we need to add an order dependency to them.

Loading…
Cancel
Save