Tools: Added option to set environment variable to not add the compile_commands.json to VSCode's c_cpp_properties.json

This commit is contained in:
Michelle Rossouw 2024-06-10 17:29:03 +10:00 committed by Peter Barker
parent 47625e693e
commit 7e5810a746
1 changed files with 1 additions and 1 deletions

View File

@ -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']: