From bd9a39e1855e58aaab2e03bd2c9a191f45b9f840 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Tue, 1 Nov 2022 14:58:50 +0100 Subject: [PATCH] Initial commit, basic CMake project Signed-off-by: Moritz Martinius --- .gitignore | 5 +++++ .vscode/c_cpp_properties.json | 1 + .vscode/settings.json | 6 ++++++ CMakeLists.txt | 18 ++++++++++++++++++ inc/.gitkeep | 0 src/main.cpp | 9 +++++++++ tests/.gitkeep | 0 7 files changed, 39 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json create mode 100644 CMakeLists.txt create mode 100644 inc/.gitkeep create mode 100644 src/main.cpp create mode 100644 tests/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a673be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +build/ +.cache/ +.vscode/* +!.vscode/c_cpp_properties.json +!.vscode/settings.json \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6db939e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "clangd.arguments": [ "-log=verbose", + "-pretty", + "--background-index", + "--compile-commands-dir=${workspaceFolder}/build"] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..af8b1c7 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.5) + +project(ptouch-prnt) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" CACHE STRING "Set C++ Compiler Flags" FORCE) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +set(SOURCES + src/main.cpp +) + +add_executable(ptouch-prnt ${SOURCES}) + +target_include_directories(ptouch-prnt + PRIVATE + ${PROJECT_SOURCE_DIR/inc} +) \ No newline at end of file diff --git a/inc/.gitkeep b/inc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..8063fb9 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,9 @@ +#include + + +int main(int argc, char** argv) { + + std::cout << "Hello World!" << std::endl; + + return 0; +} \ No newline at end of file diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..e69de29