Skip to content

Commit

Permalink
Generate compile_commands.json
Browse files Browse the repository at this point in the history
Fixes #6, and possibly other intellisense bugs

Signed-off-by: William Vinnicombe <[email protected]>
  • Loading branch information
will-v-pi committed Apr 5, 2024
1 parent 25abc6a commit f0cf28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ def GenerateCMake(folder, params):
cmake_header1 = (f"# Generated Cmake Pico project file\n\n"
"cmake_minimum_required(VERSION 3.13)\n\n"
"set(CMAKE_C_STANDARD 11)\n"
"set(CMAKE_CXX_STANDARD 17)\n\n"
"set(CMAKE_CXX_STANDARD 17)\n"
"set(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n\n"
"# Initialise pico_sdk from installed location\n"
"# (note this can come from environment, CMake cache etc)\n\n"
)
Expand Down Expand Up @@ -839,6 +840,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger,
],
"defines": [],
"compilerPath": "{cPath}",
"compileCommands": "${{workspaceFolder}}/build/compile_commands.json",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "linux-gcc-arm"
Expand Down

0 comments on commit f0cf28e

Please sign in to comment.