{
  "version": 3,
  "configurePresets": [
    {
      "name": "dev",
      "displayName": "dev",
      "description": "Preset for developers",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build-${presetName}",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Debug",
        "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
      }
    },
    {
      "name": "qt6",
      "cacheVariables": {
        "QT6_BUILD": "ON"
      }
    },
    {
      "name": "asan",
      "cacheVariables": {
        "CMAKE_CXX_FLAGS_DEBUG": "-g -fsanitize=address,undefined",
        "CMAKE_C_FLAGS_DEBUG": "-g -fsanitize=address,undefined"
      }
    },
    {
      "name": "dev-qt6",
      "displayName": "dev with Qt6",
      "description": "Preset for developers using Qt6",
      "inherits": [
        "dev",
        "qt6"
      ]
    },
    {
      "name": "dev-asan",
      "displayName": "dev with sanitizers",
      "description": "Preset for developers with asan and ubsan enabled",
      "inherits": [
        "dev",
        "asan"
      ]
    },
    {
      "name": "dev-asan-qt6",
      "displayName": "dev with sanitizers, Qt6",
      "description": "Preset for developers with Qt6, asan and ubsan enabled",
      "inherits": [
        "dev-asan",
        "qt6"
      ]
    },
    {
      "name": "dev-clazy",
      "displayName": "clazy with sanitizers",
      "description": "Preset for compiling with clang/clazy and asan and ubsan enabled",
      "cacheVariables": {
        "CMAKE_CXX_COMPILER": "clazy",
        "CMAKE_C_COMPILER": "clang",
        "CMAKE_CXX_FLAGS": "-Xclang -plugin-arg-clazy -Xclang level0,level1,level2,no-strict-iterators,no-ctor-missing-parent-argument -Werror",
        "CMAKE_C_FLAGS": "-Werror"
      },
      "inherits": [
        "dev-asan"
      ]
    },
    {
      "name": "dev-clazy-qt6",
      "displayName": "clazy with sanitizers, Qt6",
      "description": "Preset for compiling with clang/clazy, Qt6 and asan and ubsan enabled",
      "inherits": [
        "dev-clazy",
        "qt6"
      ]
    },
    {
      "name": "dev-opt",
      "displayName": "dev with optimizations",
      "description": "Preset for developers with compiler optimizations enabled",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "RelWithDebInfo",
        "CMAKE_CXX_FLAGS" : "-DQT_FORCE_ASSERTS -DQT_MESSAGELOGCONTEXT"
      },
      "inherits": [
        "dev"
      ]
    },
    {
      "name": "dev-opt-qt6",
      "displayName": "dev with Qt6, optimizations",
      "description": "Preset for developers with Qt6, compiler optimizations enabled",
      "inherits": [
        "dev-opt",
        "qt6"
      ]
    },
    {
      "name": "dev-opt-asan",
      "displayName": "dev with optimizations and sanitizers",
      "description": "Preset for developers with compiler optimizations and sanitizers enabled",
      "inherits": [
        "dev-opt",
        "asan"
      ]
    },
    {
      "name": "dev-opt-asan-qt6",
      "displayName": "dev with optimizations, Qt6 and sanitizers",
      "description": "Preset for developers with Qt6, compiler optimizations and sanitizers enabled",
      "inherits": [
        "dev-opt-asan",
        "qt6"
      ]
    }
  ],
  "buildPresets": [
    {
      "name": "dev",
      "configurePreset": "dev"
    },
    {
      "name": "dev-qt6",
      "configurePreset": "dev-qt6"
    },
    {
      "name": "dev-asan",
      "configurePreset": "dev-asan"
    },
    {
      "name": "dev-asan-qt6",
      "configurePreset": "dev-asan-qt6"
    },
    {
      "name": "dev-opt",
      "configurePreset": "dev-opt"
    },
    {
      "name": "dev-opt-qt6",
      "configurePreset": "dev-opt-qt6"
    },
    {
      "name": "dev-opt-asan",
      "configurePreset": "dev-opt-asan"
    },
    {
      "name": "dev-opt-asan-qt6",
      "configurePreset": "dev-opt-asan-qt6"
    },
    {
      "name": "dev-clazy",
      "configurePreset": "dev-clazy"
    },
    {
      "name": "dev-clazy-qt6",
      "configurePreset": "dev-clazy-qt6"
    }
  ],
  "testPresets": [
    {
      "name": "base",
      "hidden": true,
      "output": {"outputOnFailure": true},
      "execution": {"noTestsAction": "error", "stopOnFailure": true}
    },
    {
      "name": "dev",
      "configurePreset": "dev",
      "inherits": "base"
    },
    {
      "name": "dev-asan",
      "configurePreset": "dev-asan",
      "inherits": "base"
    },
    {
      "name": "dev-opt",
      "configurePreset": "dev-opt",
      "inherits": "base"
    },
    {
      "name": "dev-opt-asan",
      "configurePreset": "dev-opt-asan",
      "inherits": "base"
    },
    {
      "name": "dev-clazy",
      "configurePreset": "dev-clazy",
      "inherits": "base"
    },
    {
      "name": "dev-qt6",
      "configurePreset": "dev-qt6",
      "inherits": "base"
    },
    {
      "name": "dev-asan-qt6",
      "configurePreset": "dev-asan-qt6",
      "inherits": "base"
    },
    {
      "name": "dev-opt-qt6",
      "configurePreset": "dev-opt-qt6",
      "inherits": "base"
    },
    {
      "name": "dev-opt-asan-qt6",
      "configurePreset": "dev-opt-asan-qt6",
      "inherits": "base"
    },
    {
      "name": "dev-clazy-qt6",
      "configurePreset": "dev-clazy-qt6",
      "inherits": "base"
    }
  ]
}
