Integrate cmake with vscode

This commit is contained in:
Rafał Grodziński
2025-06-21 17:11:38 +09:00
parent 7a76bb7e33
commit 1da1622b8a
3 changed files with 11 additions and 15 deletions

5
.vscode/launch.json vendored
View File

@@ -5,9 +5,10 @@
"name": "Debug Bits Runner Builder", "name": "Debug Bits Runner Builder",
"type": "lldb-dap", "type": "lldb-dap",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/brb", "program": "${command:cmake.launchTargetPath}",
"args": ["-v", "${workspaceFolder}/test.brc"], "args": ["-v", "${workspaceFolder}/test.brc"],
"internalConsoleOptions": "openOnSessionStart" "cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart",
} }
] ]
} }

15
.vscode/tasks.json vendored
View File

@@ -2,22 +2,13 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "Build Bits Runner Builder", "label": "Build Bits Runner Builder (Debug)",
"type": "shell", "type": "cmake",
"command": "cmake --build build", "command": "build",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
} }
},
{
"label": "Clean built product",
"type": "shell",
"command": "cmake --build build --target clean",
"group": {
"kind": "none",
"isDefault": false
}
} }
] ]
} }

View File

@@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 4.0) cmake_minimum_required(VERSION 4.0)
project(bits-runner-builder LANGUAGES CXX) project(
bits-runner-builder
VERSION 0.1.0
LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_COLOR_DIAGNOSTICS OFF)
find_package(LLVM REQUIRED CONFIG) find_package(LLVM REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS}) include_directories(${LLVM_INCLUDE_DIRS})