From d87b07f8d9c700740f3297a52e3c3d9a0a15b5e5 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 14 Mar 2024 14:10:17 +0100 Subject: [PATCH] chore: add AbstractFactory --- AbstractFactory/CMakeLists.txt | 21 +++++++++++++++++++++ AbstractFactory/bootstrap.sh | 4 ++++ AbstractFactory/build.sh | 3 +++ AbstractFactory/main.cpp | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 AbstractFactory/CMakeLists.txt create mode 100755 AbstractFactory/bootstrap.sh create mode 100755 AbstractFactory/build.sh create mode 100644 AbstractFactory/main.cpp diff --git a/AbstractFactory/CMakeLists.txt b/AbstractFactory/CMakeLists.txt new file mode 100644 index 0000000..045410d --- /dev/null +++ b/AbstractFactory/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.20) + +project( + AbstractFactory + VERSION 0.1.0 + LANGUAGES CXX) + +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../cmake") + +include(ExportCompileCommands) +include(sccache) + +add_executable(AbstractFactory main.cpp) + +target_compile_features(AbstractFactory PUBLIC cxx_std_20) + +set_target_properties( + AbstractFactory + PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" + RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin") diff --git a/AbstractFactory/bootstrap.sh b/AbstractFactory/bootstrap.sh new file mode 100755 index 0000000..98b48ad --- /dev/null +++ b/AbstractFactory/bootstrap.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +cmake -S . -B .build -G Ninja -D CMAKE_EXPORT_COMPILE_COMMANDS=ON +ln -s .build/compile_commands.json diff --git a/AbstractFactory/build.sh b/AbstractFactory/build.sh new file mode 100755 index 0000000..d26a5a3 --- /dev/null +++ b/AbstractFactory/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +cmake --build .build diff --git a/AbstractFactory/main.cpp b/AbstractFactory/main.cpp new file mode 100644 index 0000000..a70cc6e --- /dev/null +++ b/AbstractFactory/main.cpp @@ -0,0 +1,8 @@ +#include + +int main(int argc, char *argv[]) { + + std::cout << "AbstractFactory" << std::endl; + + return EXIT_SUCCESS; +}