Skip to content

Commit defd499

Browse files
I made a settings.json.template si settings.json can be customized (#338)
I also modified tasks.json and launch.json so they use info in the settings.json file, eliminating the need to edit those for changes to the hyrax $prefix env var. I added settings.json to .gitignore so that one persons $prefix paths don't over write someone elses.
1 parent 6cf90e3 commit defd499

5 files changed

Lines changed: 155 additions & 182 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.DS_Store
33
*/.DS_Store
44
.idea
5-
.vscode/
5+
.vscode/settings.json
66
.cproject
77
.project
88
.settings

.vscode/launch.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug getdap4",
6+
"type": "cppdbg",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/.libs/getdap4",
9+
"args": ["-d", "http://test.opendap.org/opendap/data/nc/fnoc1.nc"],
10+
"cwd": "${workspaceFolder}",
11+
"environment": [
412
{
5-
"name": "Debug getdap4",
6-
"type": "cppdbg",
7-
"request": "launch",
8-
"program": "${workspaceFolder}/.libs/getdap4",
9-
"args": ["-d", "http://test.opendap.org/opendap/data/nc/fnoc1.nc"],
10-
"cwd": "${workspaceFolder}",
11-
"environment": [
12-
{
13-
"name": "DYLD_LIBRARY_PATH",
14-
"value": "${workspaceFolder}/.libs:${env:DYLD_LIBRARY_PATH}"
15-
},
16-
{
17-
"name": "PATH",
18-
"value": "~/opendap/hyrax/build/bin:~/src/opendap/hyrax/build/deps/bin:${env:PATH}"
19-
}
20-
],
21-
"MIMode": "lldb",
22-
"setupCommands": [
23-
{
24-
"description": "Allow stepping into all frames",
25-
"text": "settings set target.process.thread.step-avoid-regexp ^$",
26-
"ignoreFailures": true
27-
}
28-
]
13+
"name": "DYLD_LIBRARY_PATH",
14+
"value": "${workspaceFolder}/.libs:${env:DYLD_LIBRARY_PATH}"
15+
},
16+
{
17+
"name": "PATH",
18+
"value": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
19+
}
20+
],
21+
"MIMode": "lldb",
22+
"setupCommands": [
23+
{
24+
"description": "Allow stepping into all frames",
25+
"text": "settings set target.process.thread.step-avoid-regexp ^$",
26+
"ignoreFailures": true
2927
}
30-
]
28+
]
29+
}
30+
]
3131
}

.vscode/settings.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.vscode/settings.json.template

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools",
3+
"C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json",
4+
"C_Cpp.default.cppStandard": "c++14",
5+
"C_Cpp.default.intelliSenseMode": "macos-clang-arm64",
6+
"terminal.integrated.env.osx": {
7+
"HYRAX_PREFIX": The litteral value of $prefix.,
8+
"PATH": $prefix litteral value + /bin: $prefix litteral value + deps/bin:${env:PATH}
9+
},
10+
"terminal.integrated.env.linux": {
11+
"HYRAX_PREFIX": The litteral value of $prefix.,
12+
"PATH": $prefix litteral value + /bin: $prefix litteral value + deps/bin:${env:PATH}"
13+
}
14+
}

.vscode/tasks.json

Lines changed: 113 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,121 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "autotools: configure",
6-
"type": "shell",
7-
"command": "autoreconf -fvi && ./configure --prefix=$prefix --enable-developer",
8-
"options": {
9-
"cwd": "${workspaceFolder}",
10-
"env": {
11-
"prefix": "~/src/hyrax/build",
12-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
13-
},
14-
"shell": {
15-
"executable": "/bin/zsh",
16-
"args": [
17-
"-c"
18-
]
19-
}
20-
},
21-
"problemMatcher": [],
22-
"group": {
23-
"kind": "build",
24-
"isDefault": true
25-
}
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "autotools: configure",
6+
"type": "shell",
7+
"command": "autoreconf -fvi && ./configure --prefix=$prefix --enable-developer",
8+
"options": {
9+
"cwd": "${workspaceFolder}",
10+
"env": {
11+
"prefix": "${env:HYRAX_PREFIX}",
12+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
2613
},
27-
{
28-
"label": "autotools: build",
29-
"type": "shell",
30-
"command": "make -j",
31-
"options": {
32-
"cwd": "${workspaceFolder}",
33-
"env": {
34-
"prefix": "~/src/hyrax/build",
35-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
36-
},
37-
"shell": {
38-
"executable": "/bin/zsh",
39-
"args": [
40-
"-c"
41-
]
42-
}
43-
},
44-
"problemMatcher": [
45-
"$gcc"
46-
],
47-
"group": {
48-
"kind": "build",
49-
"isDefault": true
50-
}
14+
"shell": {
15+
"executable": "/bin/zsh",
16+
"args": ["-c"]
17+
}
18+
},
19+
"problemMatcher": [],
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
}
24+
},
25+
{
26+
"label": "autotools: build",
27+
"type": "shell",
28+
"command": "make -j",
29+
"options": {
30+
"cwd": "${workspaceFolder}",
31+
"env": {
32+
"prefix": "${env:HYRAX_PREFIX}",
33+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
34+
},
35+
"shell": {
36+
"executable": "/bin/zsh",
37+
"args": ["-c"]
38+
}
39+
},
40+
"problemMatcher": ["$gcc"],
41+
"group": {
42+
"kind": "build",
43+
"isDefault": true
44+
}
45+
},
46+
{
47+
"label": "autotools: check",
48+
"type": "shell",
49+
"command": "make -j check",
50+
"options": {
51+
"cwd": "${workspaceFolder}",
52+
"env": {
53+
"TESTSUITEFLAGS": "-j",
54+
"prefix": "${env:HYRAX_PREFIX}",
55+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
5156
},
52-
{
53-
"label": "autotools: check",
54-
"type": "shell",
55-
"command": "make -j check",
56-
"options": {
57-
"cwd": "${workspaceFolder}",
58-
"env": {
59-
"prefix": "~/src/hyrax/build",
60-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
61-
},
62-
"shell": {
63-
"executable": "/bin/zsh",
64-
"args": [
65-
"-c"
66-
]
67-
}
68-
},
69-
"problemMatcher": [
70-
"$gcc"
71-
],
72-
"group": {
73-
"kind": "build",
74-
"isDefault": true
75-
}
57+
"shell": {
58+
"executable": "/bin/zsh",
59+
"args": ["-c"]
60+
}
61+
},
62+
"problemMatcher": ["$gcc"],
63+
"group": {
64+
"kind": "build",
65+
"isDefault": true
66+
}
67+
},
68+
{
69+
"label": "autotools: install",
70+
"type": "shell",
71+
"command": "make install",
72+
"options": {
73+
"cwd": "${workspaceFolder}",
74+
"env": {
75+
"prefix": "${env:HYRAX_PREFIX}",
76+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
7677
},
77-
{
78-
"label": "autotools: install",
79-
"type": "shell",
80-
"command": "make install",
81-
"options": {
82-
"cwd": "${workspaceFolder}",
83-
"env": {
84-
"prefix": "~/src/hyrax/build",
85-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
86-
},
87-
"shell": {
88-
"executable": "/bin/zsh",
89-
"args": [
90-
"-c"
91-
]
92-
}
93-
},
94-
"problemMatcher": []
78+
"shell": {
79+
"executable": "/bin/zsh",
80+
"args": ["-c"]
81+
}
82+
},
83+
"problemMatcher": []
84+
},
85+
{
86+
"label": "autotools: clean",
87+
"type": "shell",
88+
"command": "make clean",
89+
"options": {
90+
"cwd": "${workspaceFolder}",
91+
"env": {
92+
"prefix": "${env:HYRAX_PREFIX}",
93+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
9594
},
96-
{
97-
"label": "autotools: clean",
98-
"type": "shell",
99-
"command": "make clean",
100-
"options": {
101-
"cwd": "${workspaceFolder}",
102-
"env": {
103-
"prefix": "~/src/hyrax/build",
104-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
105-
},
106-
"shell": {
107-
"executable": "/bin/zsh",
108-
"args": [
109-
"-c"
110-
]
111-
}
112-
},
113-
"problemMatcher": []
95+
"shell": {
96+
"executable": "/bin/zsh",
97+
"args": ["-c"]
98+
}
99+
},
100+
"problemMatcher": []
101+
},
102+
{
103+
"label": "autotools: compile_commands",
104+
"type": "shell",
105+
"command": "make clean && bear -- make -j && bear --append -- make -j check",
106+
"options": {
107+
"cwd": "${workspaceFolder}",
108+
"env": {
109+
"TESTSUITEFLGS": "-j",
110+
"prefix": "${env:HYRAX_PREFIX}",
111+
"PATH": "${env:HYRAX_PREFIX}/bin:${env:HYRAX_PREFIX}/deps/bin:${env:PATH}"
114112
},
115-
{
116-
"label": "autotools: compile_commands",
117-
"type": "shell",
118-
"command": "make clean && bear -- make -j && bear --append -- make -j check",
119-
"options": {
120-
"cwd": "${workspaceFolder}",
121-
"env": {
122-
"prefix": "~/src/hyrax/build",
123-
"PATH": "~/src/hyrax/build/bin:~/src/hyrax/build/deps/bin:${env:PATH}"
124-
},
125-
"shell": {
126-
"executable": "/bin/zsh",
127-
"args": [
128-
"-c"
129-
]
130-
}
131-
},
132-
"problemMatcher": [
133-
"$gcc"
134-
]
113+
"shell": {
114+
"executable": "/bin/zsh",
115+
"args": ["-c"]
135116
}
136-
]
117+
},
118+
"problemMatcher": ["$gcc"]
119+
}
120+
]
137121
}

0 commit comments

Comments
 (0)