Skip to content

Commit

Permalink
Create empty compile_commands.json, to prevent intellisense warning
Browse files Browse the repository at this point in the history
This prevents the C/C++ intellisense warning you get with some new projects that compile_commands.json cannot be parsed (eg #118), and will be immediately replaced with the correct file once CMake has been configured
  • Loading branch information
will-v-pi committed Dec 2, 2024
1 parent 94c44f7 commit 96b122c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,11 @@ def DoEverything(params):
if os.path.exists(CMAKECACHE_FILENAME):
os.remove(CMAKECACHE_FILENAME)

if not os.path.exists("compile_commands.json"):
# Create empty compile_commands.json to prevent intellisense warning
with open("compile_commands.json", "w") as f:
f.write("[]\n")

if params["projects"]:
generateProjectFiles(
projectPath,
Expand Down

0 comments on commit 96b122c

Please sign in to comment.