Clean if complile_commands.json doesn't exist

Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
Somebody Master 2023-03-02 11:17:15 +01:00
parent 8884aea1dd
commit 0d03a90f08
Signed by: somebody_master
GPG Key ID: 78315CFDF0B25505

View File

@ -76,6 +76,7 @@ function build_db() {
cd "$_build_folder" || clean_exit 1 "$_error_build_folder"
if [ ! -f "../${_bin_folder}/compile_commands.json" ]; then
clean "$_default_platform"
bear --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform"
else
bear --append --output "../${_bin_folder}/compile_commands.json" -- scons platform="$_default_platform"