{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 16,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "default",
      "displayName": "Default Config",
      "description": "Default build using Ninja generator",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build",
      "cacheVariables": {
        "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
      }
    },
    {
      "name": "debug",
      "displayName": "Debug Config",
      "inherits": "default",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Debug"
      }
    },
    {
      "name": "release",
      "displayName": "Release Config",
      "inherits": "default",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Release"
      }
    },
    {
      "name": "ci",
      "displayName": "CI Config",
      "inherits": "release",
      "cacheVariables": {
        "T81_BUILD_TESTS": "ON",
        "T81_BUILD_EXAMPLES": "ON",
        "T81_BUILD_BENCHMARKS": "OFF",
        "T81_ENABLE_TERNARYOS": "ON",
        "T81_ENABLE_DPE": "ON"
      }
    },
    {
      "name": "dev",
      "displayName": "Dev Config (debug + tests + TernaryOS + DPE)",
      "description": "Local development preset: debug build with tests, TernaryOS, and DPE enabled. Test inventory depends on enabled options. Run: cmake --preset dev && cmake --build build-dev && ctest --preset dev",
      "inherits": "default",
      "binaryDir": "${sourceDir}/build-dev",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Debug",
        "T81_BUILD_TESTS": "ON",
        "T81_BUILD_EXAMPLES": "OFF",
        "T81_BUILD_BENCHMARKS": "OFF",
        "T81_ENABLE_TERNARYOS": "ON",
        "T81_ENABLE_DPE": "ON"
      }
    },
    {
      "name": "asan",
      "displayName": "ASan/UBSan (matches CI sanitizers job)",
      "description": "Debug build with AddressSanitizer and UndefinedBehaviorSanitizer. Mirrors the CI 'sanitizers' job exactly. Run: cmake --preset asan && cmake --build build-asan && ctest --preset asan",
      "inherits": "default",
      "binaryDir": "${sourceDir}/build-asan",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Debug",
        "T81_BUILD_TESTS": "ON",
        "T81_BUILD_EXAMPLES": "OFF",
        "T81_BUILD_BENCHMARKS": "OFF",
        "T81_ENABLE_ASAN": "ON",
        "T81_ENABLE_UBSAN": "ON"
      }
    },
    {
      "name": "warn-strict",
      "displayName": "Strict Warning Scan (local pre-push check)",
      "description": "Clang build with -Werror and the same warning classes enforced by Windows CI (cl.exe /W4 /WX and clang-cl). Run before pushing to catch -Wswitch, -Wunused, and -Wconversion issues locally. Usage: cmake --preset warn-strict && cmake --build build-warn-strict 2>&1 | head -40",
      "inherits": "release",
      "binaryDir": "${sourceDir}/build-warn-strict",
      "cacheVariables": {
        "T81_BUILD_TESTS": "ON",
        "T81_BUILD_EXAMPLES": "OFF",
        "T81_BUILD_BENCHMARKS": "OFF",
        "T81_WARN_STRICT": "ON",
        "CMAKE_CXX_FLAGS": "-Werror -Wswitch -Wunused-variable -Wunused-function -Wno-deprecated-declarations"
      }
    }
  ],
  "buildPresets": [
    {
      "name": "debug",
      "configurePreset": "debug"
    },
    {
      "name": "release",
      "configurePreset": "release"
    },
    {
      "name": "ci",
      "configurePreset": "ci"
    },
    {
      "name": "dev",
      "configurePreset": "dev"
    },
    {
      "name": "asan",
      "configurePreset": "asan"
    },
    {
      "name": "warn-strict",
      "configurePreset": "warn-strict"
    }
  ],
  "testPresets": [
    {
      "name": "ci",
      "configurePreset": "ci",
      "output": {
        "outputOnFailure": true
      },
      "execution": {
        "noTestsAction": "error",
        "stopOnFailure": true
      }
    },
    {
      "name": "dev",
      "configurePreset": "dev",
      "output": {
        "outputOnFailure": true
      },
      "execution": {
        "noTestsAction": "error",
        "stopOnFailure": false
      }
    },
    {
      "name": "asan",
      "configurePreset": "asan",
      "output": {
        "outputOnFailure": true
      },
      "execution": {
        "noTestsAction": "error",
        "stopOnFailure": false
      }
    },
    {
      "name": "warn-strict",
      "configurePreset": "warn-strict",
      "output": {
        "outputOnFailure": true
      },
      "execution": {
        "noTestsAction": "error",
        "stopOnFailure": false
      }
    }
  ]
}
