Skip to content

Commit 97e4af5

Browse files
JakeChampionJake Champion
andauthored
Fix make compile_commands.json and add to vscode project settings (#96)
* add compile_commands.json to the vscode project manifest * Use /bin/bash in Makefile to stop outputing '-n' in the compile_commands.json file Because no specific shell was set in the Makefile it defaults to /bin/sh which has a built-in version of echo that does not accept the -n option and instead will write -n to stdout. Setting the shell to /bin/bash means we will use bash and bashs's built-n echo which does support the -n option, which means we will start generating a valid JSON file for compile_commands.json Co-authored-by: Jake Champion <[email protected]>
1 parent ab49da5 commit 97e4af5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.vscode/c_cpp_properties.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
},
2222
"forcedInclude": [
2323
"${workspaceFolder}/.vscode/vscode-preinclude.h"
24-
]
24+
],
25+
"compileCommands": "${workspaceFolder}/c-dependencies/js-compute-runtime/compile_commands.json"
2526
}
2627
],
2728
"version": 4

c-dependencies/js-compute-runtime/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
SHELL:=/bin/bash
12
INIT_JS ?= test.js
23
WIZER ?= wizer
34

0 commit comments

Comments
 (0)