From 3928379d6fc386075b5e9c2ecbdcefebd4457642 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 14 Mar 2024 11:33:13 +0100 Subject: [PATCH] chore: setup Builder --- Builder/CMakeLists.txt | 21 +++++++++++++++++++++ Builder/bootstrap.sh | 4 ++++ Builder/build.sh | 3 +++ Builder/main.cpp | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 Builder/CMakeLists.txt create mode 100755 Builder/bootstrap.sh create mode 100755 Builder/build.sh create mode 100644 Builder/main.cpp diff --git a/Builder/CMakeLists.txt b/Builder/CMakeLists.txt new file mode 100644 index 0000000..f2bef00 --- /dev/null +++ b/Builder/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.20) + +project( + Builder + VERSION 0.1.0 + LANGUAGES CXX) + +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../cmake") + +include(ExportCompileCommands) +include(sccache) + +add_executable(Builder main.cpp) + +target_compile_features(Builder PUBLIC cxx_std_20) + +set_target_properties( + Builder + 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/Builder/bootstrap.sh b/Builder/bootstrap.sh new file mode 100755 index 0000000..98b48ad --- /dev/null +++ b/Builder/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/Builder/build.sh b/Builder/build.sh new file mode 100755 index 0000000..d26a5a3 --- /dev/null +++ b/Builder/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +cmake --build .build diff --git a/Builder/main.cpp b/Builder/main.cpp new file mode 100644 index 0000000..75a1228 --- /dev/null +++ b/Builder/main.cpp @@ -0,0 +1,8 @@ +#include + +int main(int argc, char *argv[]) { + + std::cout << "Builder" << std::endl; + + return EXIT_SUCCESS; +}