Better error message when compdb generation fails.

pull/537/head
Jussi Pakkanen 9 years ago
parent 46ce7a9d4b
commit 8d73d3023a
  1. 3
      mesonbuild/backend/ninjabackend.py

@ -199,7 +199,10 @@ int dummy;
def generate_compdb(self):
ninja_exe = environment.detect_ninja()
builddir = self.environment.get_build_dir()
try:
jsondb = subprocess.check_output([ninja_exe, '-t', 'compdb', 'c_COMPILER', 'cpp_COMPILER'], cwd=builddir)
except Exception:
raise MesonException('Could not create compilation database.')
open(os.path.join(builddir, 'compile_commands.json'), 'wb').write(jsondb)
# Get all generated headers. Any source file might need them so

Loading…
Cancel
Save