Skip to content

Commit

Permalink
Merge pull request #3 from simonthorell/dev
Browse files Browse the repository at this point in the history
Added dependencies and reworked CMake files
  • Loading branch information
simonthorell authored Feb 5, 2024
2 parents 9d34ea2 + 6100c0a commit c049ce2
Show file tree
Hide file tree
Showing 14 changed files with 267 additions and 149 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# Git, OpenSSL, and SSL development libraries are required to build the dependencies
# Git, OpenSSL, SSL and SQLite3 development libraries are required to build the dependencies
RUN apt-get update && apt-get install -y \
git \
ninja-build \
openssl \
libssl-dev \
sqlite3 \
&& rm -rf /var/lib/apt/lists/*

#==============================================================================
Expand Down
9 changes: 5 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
// Configure tool-specific properties.
"customizations": {
"extensions": [
"ms-vscode.cpptools", // C/C++ Extension
"ms-vscode.cmake-tools", // CMake Tools
"twxs.cmake" // CMake Extension
"ms-vscode.cpptools", // C/C++ Extension
"ms-vscode.cmake-tools", // CMake Tools
"twxs.cmake" // CMake Extension
],
"vscode": {
"extensions": [
"tal7aouy.icons" // Custom VS-Code Icons
"tal7aouy.icons", // Custom VS-Code Icons
"bierner.markdown-preview-github-styles" // Markdown Preview Github Styles
]
}
},
Expand Down
14 changes: 14 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"configurations": [
{
"name": "Linux Debian12 DevContainer",
"includePath": ["${workspaceFolder}/**"],
"defines": [],
"compilerPath": "/usr/bin/aarch64-linux-gnu-g++",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "linux-gcc-arm64"
}
],
"version": 4
}
10 changes: 10 additions & 0 deletions .vscode/cmake-kits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"name": "GCC 12.2.0 aarch64-linux-gnu",
"compilers": {
"C": "/usr/bin/aarch64-linux-gnu-gcc",
"CXX": "/usr/bin/aarch64-linux-gnu-g++"
},
"isTrusted": true
}
]
5 changes: 0 additions & 5 deletions .vscode/keybindings.json

This file was deleted.

27 changes: 20 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug MyProject with LLDB",
"name": "C/C++: Debug Project",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/src/MyProject",
"args": [],
"program": "${workspaceFolder}/build/debug/cpp-mqtt-sqlite", // Path to your binary
"args": [], // Command line arguments (if any)
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false, // Set to true in order to use MacOS terminal instead of VSCode terminal
"MIMode": "lldb",
"preLaunchTask": "CMake Build Task" // Replace with your build task name
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb", // Path to GDB
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "CMake Build Task", // Task to run before debugging
"logging": {
"trace": true,
"traceResponse": true,
"engineLogging": true
}
}
]
}
}
162 changes: 81 additions & 81 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
"workbench.iconTheme": "icons",
"files.associations": {
"__bit_reference": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__verbose_abort": "cpp",
"array": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"locale": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"ratio": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"variant": "cpp",
"vector": "cpp",
"algorithm": "cpp",
"condition_variable": "cpp",
"iomanip": "cpp",
"numbers": "cpp",
"thread": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"chrono": "cpp",
"compare": "cpp",
"concepts": "cpp",
"deque": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"random": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"format": "cpp",
"ranges": "cpp",
"queue": "cpp",
"semaphore": "cpp",
"stack": "cpp",
"stop_token": "cpp"
}
"workbench.iconTheme": "icons",
"files.associations": {
"__bit_reference": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__verbose_abort": "cpp",
"array": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"locale": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"ratio": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"variant": "cpp",
"vector": "cpp",
"algorithm": "cpp",
"condition_variable": "cpp",
"iomanip": "cpp",
"numbers": "cpp",
"thread": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"chrono": "cpp",
"compare": "cpp",
"concepts": "cpp",
"deque": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"random": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"format": "cpp",
"ranges": "cpp",
"queue": "cpp",
"semaphore": "cpp",
"stack": "cpp",
"stop_token": "cpp"
}
}
70 changes: 55 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,73 @@
{
"version": "2.0.0",
"tasks": [
{
// Debug task
"label": "CMake Build Task",
"type": "shell",
"command": "cmake",
"type": "cppbuild",
"command": "/usr/bin/aarch64-linux-gnu-g++",
"args": [
"--build",
"${workspaceFolder}/build"
// Add additional arguments as needed
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I${workspaceFolder}/include"
],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Debugging Configuration"
},
{
// Run executable task
"label": "Run MyProject",
"label": "Run Debug Binary",
"type": "shell",
"command": "${workspaceFolder}/build/src/MyProject",
"command": "${workspaceFolder}/build/debug/cpp-mqtt-sqlite",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"clear": true
},
"problemMatcher": []
},
{
"label": "Run Release Binary",
"type": "shell",
"command": "${workspaceFolder}/build/release/cpp-mqtt-sqlite",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new",
"clear": true
},
"problemMatcher": []
},
{
"type": "cppbuild",
"label": "C/C++: g++-12 build active file",
"command": "/usr/bin/g++-12",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
]
],
"version": "2.0.0"
}
Loading

0 comments on commit c049ce2

Please sign in to comment.