From 78e7cd8ab57b6ef06a0123a27a570051afcecb49 Mon Sep 17 00:00:00 2001 From: Tenshi Date: Tue, 19 Sep 2023 23:56:47 +0200 Subject: [PATCH] POC: Add repo initialisation Minor --- .gitignore | 40 ++++++++++++++++++++++++++++++++ src/poc/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++++++ src/poc/src/CMakeLists.txt | 14 ++++++++++++ src/poc/src/Registry.cpp | 9 ++++++++ src/poc/src/Registry.hpp | 5 ++++ src/poc/src/main.cpp | 7 ++++++ 6 files changed, 122 insertions(+) create mode 100644 .gitignore create mode 100644 src/poc/CMakeLists.txt create mode 100644 src/poc/src/CMakeLists.txt create mode 100644 src/poc/src/Registry.cpp create mode 100644 src/poc/src/Registry.hpp create mode 100644 src/poc/src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fc632cff --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Misc +build/ +.idea/ +.vscode/ +.vs/ +*.ini +!dllTest/* diff --git a/src/poc/CMakeLists.txt b/src/poc/CMakeLists.txt new file mode 100644 index 00000000..17554fa1 --- /dev/null +++ b/src/poc/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.27) + +set(PROJECT_NAME poc) + +project( + ${PROJECT_NAME} + VERSION 1.0.0 + LANGUAGES CXX +) + +set(CMAKE_CXX_STANDARD 20) + +add_executable( + ${PROJECT_NAME} +) + +if(MSVC) + target_compile_options( + ${PROJECT_NAME} + PRIVATE + /W4 + ) +else() + target_compile_options( + ${PROJECT_NAME} + PRIVATE + -Wall -Wextra + ) +endif() + +add_subdirectory(src) + +if (WIN32) + add_custom_command( + TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + $ + ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.exe + ) +else() + add_custom_command( + TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + $ + ${CMAKE_SOURCE_DIR}/${PROJECT_NAME} + ) +endif() diff --git a/src/poc/src/CMakeLists.txt b/src/poc/src/CMakeLists.txt new file mode 100644 index 00000000..d0dad66d --- /dev/null +++ b/src/poc/src/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.27) + +target_include_directories( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Registry.cpp +) diff --git a/src/poc/src/Registry.cpp b/src/poc/src/Registry.cpp new file mode 100644 index 00000000..a8317376 --- /dev/null +++ b/src/poc/src/Registry.cpp @@ -0,0 +1,9 @@ +#include "Registry.hpp" + +Registry::Registry() +{ +} + +Registry::~Registry() +{ +} diff --git a/src/poc/src/Registry.hpp b/src/poc/src/Registry.hpp new file mode 100644 index 00000000..e0fb2afa --- /dev/null +++ b/src/poc/src/Registry.hpp @@ -0,0 +1,5 @@ +class Registry { + public: + Registry(); + ~Registry(); +}; diff --git a/src/poc/src/main.cpp b/src/poc/src/main.cpp new file mode 100644 index 00000000..c1fc9e64 --- /dev/null +++ b/src/poc/src/main.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + std::cout << "RTYPE POC" << std::endl; + return 0; +}