From 52daf5c5b68e5e3feca94850b7ebce22052d0593 Mon Sep 17 00:00:00 2001 From: Benedikt Galbavy Date: Tue, 30 Apr 2024 18:26:52 +0200 Subject: [PATCH] Added vscode config files --- .gitignore | 17 ++++++++++- .vscode/launch.json | 17 +++++++++++ .vscode/settings.json | 6 ++++ .vscode/tasks.json | 67 +++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 4 +-- 5 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index b3d960c..aa3c235 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,6 @@ build/ *.app # Generated by Visual Studio -.vscode/ .vs/ *.suo *.user @@ -58,6 +57,22 @@ build/ *.sublime-workspace *.sublime-project +# Created by https://www.gitignore.io/api/visualstudiocode +# Edit at https://www.gitignore.io/?templates=visualstudiocode + +### VisualStudioCode ### +.vscode/* # Maybe .vscode/**/* instead - see comments +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files +**/.history + +# End of https://www.gitignore.io/api/visualstudiocode + # macOS .DS_Store .AppleDouble diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..4de5278 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "debug", + "type": "cppdbg", + "miDebuggerPath": "c:\\mingw64\\bin\\gdb.exe", + "request": "launch", + "program": "${workspaceFolder}/build/SDL_Minigame.exe", + "cwd": "${workspaceFolder}", + "preLaunchTask": "build-debug" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5f046e7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cmake.configureOnOpen": true, + "files.associations": { + "iostream": "cpp" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..6647c0b --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,67 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "type": "shell", + "label": "build-engine-debug", + "command": "cd build; cmake -DCMAKE_BUILD_TYPE=Debug; cmake --build .", + "problemMatcher": [], + "group": "build" + }, + { + "type": "shell", + "label": "build-engine", + "command": "cd build; cmake -DCMAKE_BUILD_TYPE=Release; cmake --build .", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "docker-build", + "label": "build-doxygen", + "dockerBuild": { + "context": "${workspaceRoot}/docs/docker", + "tag": "vego_doxygen-docker", + }, + "problemMatcher": [], + }, + { + "type": "docker-run", + "label": "gen-doxygen", + "dockerRun": { + "image": "vego_doxygen-docker", + "remove": true, + "volumes": [ + { + "localPath": "${workspaceFolder}", + "containerPath": "/source" + }, + { + "localPath": "${workspaceFolder}/docs", + "containerPath": "/output" + }, + { + "localPath": "${workspaceFolder}/docs/Doxyfile", + "containerPath": "/Doxyfile" + }, + ] + }, + "problemMatcher": [], + }, + { + "type": "process", + "label": "open-doxygen", + "command": "explorer", + "windows": { + "command": "explorer.exe" + }, + "args": ["${workspaceFolder}\\docs\\html\\index.html"], + "problemMatcher": [], + "dependsOn": "gen-doxygen", + } + ] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 1905143..08e3c8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ) if(CMAKE_BUILD_TYPE MATCHES "Debug") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer") - target_link_libraries(${PROJECT_NAME} PRIVATE "-fsanitize=address") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") # -fsanitize=address -fno-omit-frame-pointer") + #target_link_libraries(${PROJECT_NAME} PRIVATE "-fsanitize=address") endif()