Commit 7bd8cbc5 authored by Timon Stampfli's avatar Timon Stampfli

use correct json encoding for workspaceTemplate

parent 3479d887
......@@ -4,83 +4,82 @@ import * as path from "path";
export function soiWorkspaceTemplate_0_8_0(store: Store): string {
if (determinePlatform() === "windows-amd64") {
return `{
"workspace":{
"templateVersion":"0.8.0"
},
"settings": {
"compilerPath": "${path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"compiler",
"bin"
)}",
"debuggerPath": "no/gdb",
"soiHeaderPath": "${path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
)}",
"cppHeaderPath": "${path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"compiler",
"include"
)}",
"flags": "-Wall -Wextra -std=c++17 -g3 -ggdb3 -D_GLIBCXX_DEBUG",
"useBundledSoiHeaders": true
}
}
`;
return JSON.stringify({
workspace: {
templateVersion: "0.8.0"
},
settings: {
compilerPath: path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"compiler",
"bin",
"c++"
),
debuggerPath: "no/gdb",
soiHeaderPath: path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
),
cppHeaderPath: path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"compiler",
"include"
),
flags: "-Wall -Wextra -std=c++17 -g3 -ggdb3 -D_GLIBCXX_DEBUG",
useBundledSoiHeaders: true
}
});
}
if (determinePlatform() === "darwin-amd64") {
return `{
"workspace":{
"templateVersion":"0.8.0"
},
"settings": {
"compilerPath": "/usr/bin/c++",
"debuggerPath": "/usr/bin/gdb",
"cppHeaderPath": "",
"soiHeaderPath": "${path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
)}",
"flags": "-Wall -Wextra -std=c++17 -g3 -ggdb3 -D_GLIBCXX_DEBUG",
"useBundledSoiHeaders": true
}
}
`;
}
return `{
"workspace":{
"templateVersion":"0.8.0"
},
"settings": {
"compilerPath": "/usr/bin/c++",
"debuggerPath": "/usr/bin/gdb",
"cppHeaderPath": "",
"soiHeaderPath": "${path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
)}",
"flags": "-Wall -Wextra -std=c++17 -g3 -ggdb3 -fsanitize=address,undefined -D_GLIBCXX_DEBUG",
"useBundledSoiHeaders": true
return JSON.stringify({
workspace: {
templateVersion: "0.8.0"
},
settings: {
compilerPath: "/usr/bin/c++",
debuggerPath: "/usr/bin/gdb",
cppHeaderPath: "",
soiHeaderPath: path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
),
flags: "-Wall -Wextra -std=c++17 -g3 -ggdb3 -D_GLIBCXX_DEBUG",
useBundledSoiHeaders: true
}
});
}
}
`;
return JSON.stringify({
workspace: {
templateVersion: "0.8.0"
},
settings: {
compilerPath: "/usr/bin/c++",
debuggerPath: "/usr/bin/gdb",
cppHeaderPath: "",
soiHeaderPath: path.join(
store.soicodeExtensionDataPath,
"bundle",
"soiheaders",
"bundle",
"soiheader"
),
flags:
"-Wall -Wextra -std=c++17 -g3 -ggdb3 -fsanitize=address,undefined -D_GLIBCXX_DEBUG",
useBundledSoiHeaders: true
}
});
}
export interface WorkspaceSettings {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment