chore: initial project setup (CMake, Conan, .gitignore)
This commit is contained in:
+14
-83
@@ -1,88 +1,19 @@
|
||||
# ---> C
|
||||
# Prerequisites
|
||||
*.d
|
||||
# CLion / JetBrains
|
||||
.idea/
|
||||
|
||||
# Object files
|
||||
# Conan
|
||||
build/
|
||||
.conan/
|
||||
|
||||
# CMake
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake_install.cmake
|
||||
compile_commands.json
|
||||
|
||||
# Binaries
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Linker output
|
||||
*.ilk
|
||||
*.map
|
||||
*.exp
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
*.su
|
||||
*.idb
|
||||
*.pdb
|
||||
|
||||
# Kernel Module Compile Results
|
||||
*.mod*
|
||||
*.cmd
|
||||
.tmp_versions/
|
||||
modules.order
|
||||
Module.symvers
|
||||
Mkfile.old
|
||||
dkms.conf
|
||||
|
||||
# ---> C++
|
||||
# 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
|
||||
|
||||
pauldb
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(PaulDB VERSION 0.1.0 LANGUAGES C CXX)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Sprachstandards
|
||||
# ---------------------------------------------------------------------------
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # -std=c++20 statt -std=gnu++20
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Conan-generierte Pakete einbinden (CMakeDeps-Finder liegen im build-Ordner)
|
||||
# ---------------------------------------------------------------------------
|
||||
# find_package(fmt REQUIRED) # Beispiel – einkommentieren wenn dep da ist
|
||||
# find_package(spdlog REQUIRED) # Beispiel
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Hauptprogramm
|
||||
# ---------------------------------------------------------------------------
|
||||
add_executable(pauldb
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
target_include_directories(pauldb
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
# Externe Libs linken – Beispiel:
|
||||
# target_link_libraries(pauldb PRIVATE fmt::fmt spdlog::spdlog)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Installationsregeln (für package() in conanfile.py)
|
||||
# ---------------------------------------------------------------------------
|
||||
install(TARGETS pauldb DESTINATION bin)
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"version": 6,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "conan-debug",
|
||||
"displayName": "Debug (Conan)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/Debug",
|
||||
"toolchainFile": "${sourceDir}/build/Debug/generators/conan_toolchain.cmake",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "conan-release",
|
||||
"displayName": "Release (Conan)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/Release",
|
||||
"toolchainFile": "${sourceDir}/build/Release/generators/conan_toolchain.cmake",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{ "name": "debug", "configurePreset": "conan-debug" },
|
||||
{ "name": "release", "configurePreset": "conan-release" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, cmake_layout
|
||||
|
||||
|
||||
class PaulDBConan(ConanFile):
|
||||
name = "pauldb"
|
||||
version = "0.1.0"
|
||||
description = "Handcrafted HTAP database – Row+Column Storage, Delta-Merge"
|
||||
license = "NONE"
|
||||
url = "https://git.paulvincenthorn.de/paulhorn/PaulDB"
|
||||
|
||||
# Welche Varianten Conan unterscheiden soll
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
|
||||
# Conan generiert conan_toolchain.cmake + Finder-Dateien für CMake
|
||||
generators = "CMakeDeps", "CMakeToolchain"
|
||||
|
||||
def layout(self):
|
||||
# Legt build-Ordner-Konvention fest (build/Debug, build/Release, …)
|
||||
cmake_layout(self)
|
||||
|
||||
def requirements(self):
|
||||
# Hier später externe Abhängigkeiten eintragen, z.B.:
|
||||
# self.requires("fmt/10.2.1")
|
||||
# self.requires("spdlog/1.13.0")
|
||||
pass
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def package(self):
|
||||
# Wird relevant, sobald PaulDB selbst als Library verpackt wird
|
||||
cmake = CMake(self)
|
||||
cmake.install()
|
||||
|
||||
def package_info(self):
|
||||
# Wird relevant, sobald andere Projekte pauldb als Dep einbinden
|
||||
self.cpp_info.libs = ["pauldb"]
|
||||
Reference in New Issue
Block a user