Reuse compile_commands.json to avoid long recompilations
Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
parent
44661d11f0
commit
6645cea4fc
@ -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 ..
|
||||
|
Loading…
Reference in New Issue
Block a user