da43859b97
Layout, Build und Konventionen analog zu mydb und cxx_scaffold_cli: Header und Quellen nebeneinander in playground/, Unit-Tests als .test.c/.test.cpp daneben, Integrationstests in tests/. Geruest-Module counter (C, Unity) und notebook (C++, doctest) zeigen jede Regel einmal an lauffaehigem Code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
129 lines
4.2 KiB
JSON
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",
|
|
"PLAYGROUND_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" }
|
|
}
|
|
]
|
|
}
|