From 9445794914576b866d8604239f12f2847bd673c8 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Wed, 2 Aug 2023 00:29:52 +0200 Subject: [PATCH] build: add vscode build configuration --- .vscode/c_cpp_properties.json | 23 +++++++++++++++++++++++ .vscode/launch.json | 31 +++++++++++++++++++++++++++++++ .vscode/tasks.json | 22 ++++++++++++++++++++++ hello.cpp | 5 ++++- 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..7943d99 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,23 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**", + "C:/libs/glew-2.2.0/include", + "C:/libs/glfw-3.3.8.bin.WIN64/include" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "windowsSdkVersion": "10.0.19041.0", + "compilerPath": "C:/MinGW/bin/g++.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "gcc-x64" + } + ], + "version": 4 +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d0f266a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/Debug/HelloAstro.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + } + ], + "preLaunchTask": "cmake build" + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..9f4f8ed --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,22 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "cmake build", + "type": "shell", + "command": "cmake", + "args": [ + "--build", + "${workspaceFolder}/build" + ], + "group": + { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/hello.cpp b/hello.cpp index 5763ae7..516754a 100644 --- a/hello.cpp +++ b/hello.cpp @@ -22,7 +22,10 @@ // To run in VS // Set startup project in Solution Explorer // Press F5 to run -// + +// To run in VSCode +// https://code.visualstudio.com/docs/cpp/config-mingw + // To compile on Arch Linux // // Install dependencies