Add Visual Studio Code build and debug configurations.
Change-Id: I57b57f49490b711b9e5d6598a9224f02d5cfa93a
Reviewed-on: https://swiftshader-review.googlesource.com/9490
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/.gitignore b/.gitignore
index 86187e9..646457b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
/lib/
/obj/
/bin/
+/build/
.vs
# Ignored files #
@@ -26,3 +27,4 @@
*.aps
*.opendb
*.db
+*~
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..2200c4b
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,104 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+
+ {
+ "name": "SubzeroTest",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceRoot}/build/SubzeroTest",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "${workspaceRoot}",
+ "environment": [],
+ "externalConsole": true,
+ "linux": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ },
+ "osx": {
+ "MIMode": "lldb"
+ },
+ "windows": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ },
+ {
+ "name": "OGLES2HelloAPI",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceRoot}/build/OGLES2HelloAPI",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "${workspaceRoot}",
+ "environment": [],
+ "externalConsole": true,
+ "linux": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ },
+ "osx": {
+ "MIMode": "lldb"
+ },
+ "windows": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ },
+ {
+ "name": "C++ Attach",
+ "type": "cppdbg",
+ "request": "attach",
+ "program": "enter program name, for example ${workspaceRoot}/a.out",
+ "processId": "${command:pickProcess}",
+ "linux": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ },
+ "osx": {
+ "MIMode": "lldb"
+ },
+ "windows": {
+ "MIMode": "gdb",
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..71f226d
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,45 @@
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
+
+ // Available variables which can be used inside of strings.
+ // ${workspaceRoot}: the root folder of the team
+ // ${file}: the current opened file
+ // ${fileBasename}: the current opened file's basename
+ // ${fileDirname}: the current opened file's dirname
+ // ${fileExtname}: the current opened file's extension
+ // ${cwd}: the current working directory of the spawned process
+
+ "version": "0.1.0",
+ "command": "sh",
+ "isShellCommand": true,
+ "args": ["-c"],
+ "showOutput": "always",
+ "suppressTaskName": true,
+ "options": {
+ "cwd": "${workspaceRoot}/build"
+ },
+ "tasks": [
+ {
+ "taskName": "cmake",
+ "args": ["cmake ."]
+ },
+ {
+ "taskName": "make",
+ "args" : ["make -j4"],
+ "isBuildCommand": true,
+ "problemMatcher": {
+ "owner": "cpp",
+ "fileLocation": "absolute",
+ "pattern": {
+ "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
+ "file": 1,
+ "line": 2,
+ "column": 3,
+ "severity": 4,
+ "message": 5
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file