From 6645cea4fcf0fb7a16813a73d19e0bf7086da943 Mon Sep 17 00:00:00 2001 From: somebody_master Date: Mon, 27 Feb 2023 21:38:07 +0100 Subject: [PATCH] Reuse compile_commands.json to avoid long recompilations Signed-off-by: somebody_master --- build/build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/build.sh b/build/build.sh index cd4c6d9..54fb96e 100755 --- a/build/build.sh +++ b/build/build.sh @@ -73,13 +73,12 @@ function build() { # Analize build process to create compile_commands.json function build_db() { - clean "$_default_platform" cd "$_build_folder" || clean_exit 1 "$_error_build_folder" - bear -- scons platform="$_default_platform" - if [ ! -f "../{$_bin_folder}/compile_commands.json" ]; then - cd "../$_bin_folder" || clean_exit 1 "$_error_bin_folder" - ln -s "../${_build_folder}/compile_commands.json" ./ + if [ ! -f "../${_bin_folder}/compile_commands.json" ]; then + bear --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform" + else + bear --append --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform" fi cd ..