Skip to content

Commit 96b122c

Browse files
committed
Create empty compile_commands.json, to prevent intellisense warning
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
1 parent 94c44f7 commit 96b122c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/pico_project.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,11 @@ def DoEverything(params):
13891389
if os.path.exists(CMAKECACHE_FILENAME):
13901390
os.remove(CMAKECACHE_FILENAME)
13911391

1392+
if not os.path.exists("compile_commands.json"):
1393+
# Create empty compile_commands.json to prevent intellisense warning
1394+
with open("compile_commands.json", "w") as f:
1395+
f.write("[]\n")
1396+
13921397
if params["projects"]:
13931398
generateProjectFiles(
13941399
projectPath,

0 commit comments

Comments
 (0)