From 7e5810a746ebcf88b60398685679a1bba8d5f5b8 Mon Sep 17 00:00:00 2001 From: Michelle Rossouw Date: Mon, 10 Jun 2024 17:29:03 +1000 Subject: [PATCH] Tools: Added option to set environment variable to not add the compile_commands.json to VSCode's c_cpp_properties.json --- Tools/ardupilotwaf/boards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index a941788940..c8d1bbbc42 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -187,7 +187,7 @@ class Board: cfg.env.prepend_value('INCLUDES', [ cfg.srcnode.find_dir('libraries/AP_Common/missing').abspath() ]) - if os.path.exists(os.path.join(env.SRCROOT, '.vscode/c_cpp_properties.json')): + if os.path.exists(os.path.join(env.SRCROOT, '.vscode/c_cpp_properties.json')) and 'AP_NO_COMPILE_COMMANDS' not in os.environ: # change c_cpp_properties.json configure the VSCode Intellisense env c_cpp_properties = json.load(open(os.path.join(env.SRCROOT, '.vscode/c_cpp_properties.json'))) for config in c_cpp_properties['configurations']: