Files
playground/CMakePresets.json
T
paulhorn db41258d16 feat: PDA als libpda + pda nach P1204R0
Ersetzt das Geruest (counter/notebook) durch ein echtes Beispiel und teilt
es in zwei eigenstaendige Projekte, wie P1204R0 es fuer Bibliothek plus
Programm verlangt.

libpda: textfile (C, Datei-I/O und Feld-Escaping), calculator
(Recursive-Descent-Parser mit std::expected), contact, editor, explorer.
Exportiert pda::pda ueber install(EXPORT) und ist per find_package(pda)
benutzbar.

pda: Shell ohne Ein-/Ausgabe (execute() gibt Text zurueck, deshalb ohne
Terminal testbar), REPL und Stapelbetrieb in main.cpp.

examples/consumer und tools/check-install.sh pruefen die Export-Kette
Ende-zu-Ende: installieren, dann ein fremdes Projekt dagegen bauen.

docs/CMAKE.md erklaert das Target-Modell, PUBLIC/PRIVATE/INTERFACE,
Generator-Ausdruecke, install/export und Symbolsichtbarkeit an diesem
Projekt.

71 Tests gruen unter Homebrew-clang 22, Apple clang und GCC 16, statisch
und shared, mit und ohne ASan/UBSan.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-30 16:39:35 +02:00

129 lines
4.2 KiB
JSON

{
"version": 6,
"cmakeMinimumRequired": { "major": 3, "minor": 28, "patch": 0 },
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"description": "binaryDir MUST stay at depth 2 (build/<preset>): neotest-ctest scans only three levels deep for a CTest database, and util/cmake.lua derives the File API path from this layout.",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "debug",
"inherits": "base",
"displayName": "Debug (clang, Ninja)",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "release",
"inherits": "base",
"displayName": "Release (clang, Ninja)",
"cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" }
},
{
"name": "asan-ubsan",
"inherits": "base",
"displayName": "Debug + AddressSanitizer + UBSan",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"PDA_SANITIZE": "address,undefined"
}
},
{
"name": "apple-clang",
"inherits": "base",
"displayName": "Portability: Apple clang",
"description": "Catches assumptions that only hold for Homebrew's libc++.",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" },
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++"
}
},
{
"name": "homebrew-gcc",
"inherits": "base",
"displayName": "Portability: GCC (macOS, Homebrew)",
"description": "Catches GCC frontend divergence -- different -Wconversion behaviour, stricter diagnostics, C23 differences -- before the Ubuntu box does. Does NOT catch glibc/ELF/ABI issues, since this still uses the Apple SDK and ld64.",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" },
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc-16",
"CMAKE_CXX_COMPILER": "g++-16"
}
},
{
"name": "linux-gcc",
"inherits": "base",
"displayName": "Portability: GCC (Linux)",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" },
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++"
}
}
],
"buildPresets": [
{ "name": "debug", "configurePreset": "debug" },
{ "name": "release", "configurePreset": "release" },
{ "name": "asan-ubsan", "configurePreset": "asan-ubsan" },
{
"name": "apple-clang",
"configurePreset": "apple-clang",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" }
},
{
"name": "homebrew-gcc",
"configurePreset": "homebrew-gcc",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" }
},
{
"name": "linux-gcc",
"configurePreset": "linux-gcc",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" }
}
],
"testPresets": [
{
"name": "base",
"hidden": true,
"output": { "outputOnFailure": true, "shortProgress": true },
"execution": { "noTestsAction": "error", "stopOnFailure": false }
},
{ "name": "debug", "inherits": "base", "configurePreset": "debug" },
{ "name": "release", "inherits": "base", "configurePreset": "release" },
{ "name": "asan-ubsan", "inherits": "base", "configurePreset": "asan-ubsan" },
{
"name": "apple-clang",
"inherits": "base",
"configurePreset": "apple-clang",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" }
},
{
"name": "homebrew-gcc",
"inherits": "base",
"configurePreset": "homebrew-gcc",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" }
},
{
"name": "linux-gcc",
"inherits": "base",
"configurePreset": "linux-gcc",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" }
}
]
}