From 477fd61a719a013fa215c2f30dd5edbe2e1643d8 Mon Sep 17 00:00:00 2001 From: AlexK-BD <89589208+AlexK-BD@users.noreply.github.com> Date: Thu, 29 Dec 2022 14:47:16 +0000 Subject: [PATCH] Do not add duplicate json files to compilation db This can lead to massive reductions in size (100x in my case) --- compdb/postprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compdb/postprocess.py b/compdb/postprocess.py index 67d5a60..90e60e5 100755 --- a/compdb/postprocess.py +++ b/compdb/postprocess.py @@ -72,7 +72,7 @@ print("Preparing compilation database...") db_entries = [] - for db in compile_command_json_db_files: + for db in set(compile_command_json_db_files): with open(db, 'r') as f: db_entries.extend(json.load(f))