From 7f82a35f74690aee691d5ff6c1617a80ce1ec1c8 Mon Sep 17 00:00:00 2001 From: cat Date: Fri, 6 Feb 2026 13:22:47 +0200 Subject: [PATCH] Added basics --- CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ headers/machine.cpp | 8 ++++++++ source/machine.hpp | 8 ++++++++ 3 files changed, 55 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 headers/machine.cpp create mode 100644 source/machine.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d2cc0f8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: Dora "cat" +# SPDX-License-Identifier: MPL-2.0 +# +# This Source Code Form is subject to the terms of the Mozilla Public License, +# v. 2.0. If a copy of the MPL was not distributed with this file, You can +# obtain one at http://mozilla.org/MPL/2.0/. + +cmake_minimum_required(VERSION 3.10) + +project(VariadicMachine VERSION 1) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address") +endif() + +include(GNUInstallDirs) + +add_library(${PROJECT_NAME} SHARED + "source/machine.cpp") + +set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ + $ +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include +) + +install(DIRECTORY headers/ DESTINATION include/${PROJECT_NAME}) diff --git a/headers/machine.cpp b/headers/machine.cpp new file mode 100644 index 0000000..f546a8b --- /dev/null +++ b/headers/machine.cpp @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: Dora "cat" + * SPDX-License-Identifier: MPL-2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + */ diff --git a/source/machine.hpp b/source/machine.hpp new file mode 100644 index 0000000..f546a8b --- /dev/null +++ b/source/machine.hpp @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: Dora "cat" + * SPDX-License-Identifier: MPL-2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. + */