Skip to content

Commit fdfd2f1

Browse files
committed
VSCode: add workspace configuration
This adds a workspace configuration to the project to make it easier for someone to get started. It adds integration for building with SwiftPM and ignores the build artifacts and vim swapfiles.
1 parent 3d10a19 commit fdfd2f1

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"cmake.configureOnOpen": false,
3+
"files.exclude": {
4+
".git": true,
5+
".build": true,
6+
".*.sw?": true,
7+
"**/.DS_Store": true
8+
}
9+
}

.vscode/tasks.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"problemMatcher": {
6+
"owner": "swift",
7+
"fileLocation": "autoDetect",
8+
"pattern": {
9+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
10+
"file": 1,
11+
"line": 2,
12+
"column": 3,
13+
"severity": 4,
14+
"message": 5
15+
}
16+
},
17+
"tasks": [
18+
{
19+
"label": "Build (Debug)",
20+
"type": "shell",
21+
"command": "swift",
22+
"args": [
23+
"build",
24+
"-c", "debug"
25+
],
26+
"group": {
27+
"kind": "build",
28+
"isDefault": true
29+
},
30+
"windows": {
31+
"options": {
32+
"shell": {
33+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
34+
"args": ["/d", "/c"]
35+
}
36+
}
37+
}
38+
},
39+
{
40+
"label": "Build (Release)",
41+
"command": "swift",
42+
"args": [
43+
"build",
44+
"-c", "release"
45+
],
46+
"group": "build",
47+
"windows": {
48+
"options": {
49+
"shell": {
50+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
51+
"args": ["/d", "/c"]
52+
}
53+
}
54+
}
55+
},
56+
{
57+
"label": "Test (Debug)",
58+
"command": "swift",
59+
"args": [
60+
"test",
61+
"-c", "debug",
62+
"-Xswiftc", "-DENABLE_TESTING",
63+
],
64+
"group": {
65+
"kind": "test",
66+
"isDefault": true
67+
},
68+
"windows": {
69+
"options": {
70+
"shell": {
71+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
72+
"args": ["/d", "/c"]
73+
}
74+
}
75+
}
76+
},
77+
{
78+
"label": "Test (Release)",
79+
"command": "swift",
80+
"args": [
81+
"test",
82+
"-c", "release",
83+
"-Xswiftc", "-DENABLE_TESTING",
84+
],
85+
"group": "test",
86+
"windows": {
87+
"options": {
88+
"shell": {
89+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
90+
"args": ["/d", "/c"]
91+
}
92+
}
93+
}
94+
}
95+
]
96+
}

0 commit comments

Comments
 (0)