Ctrl K
ComunidadGuías…

CMakePresets.json

Rama dev · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
{
    "version": 3,
    "cmakeMinimumRequired": {
        "major": 3,
        "minor": 21,
        "patch": 0
    },
    "configurePresets": [
        {
            "name": "conf-common",
            "description": "General settings that apply to all configurations",
            "hidden": true,
            "binaryDir": "${sourceDir}/build/${presetName}",
            "installDir": "${sourceDir}/build/${presetName}"
        },
        {
            "name": "conf-unixlike-common",
            "description": "Unix-like OS settings for gcc and clang toolchains",
            "hidden": true,
            "inherits": "conf-common",
            "generator": "Ninja",
            "condition": {
                "type": "anyOf",
                "conditions": [
                    {
                        "type": "inList",
                        "string": "${hostSystemName}",
                        "list": ["Linux", "Darwin"]
                    },
                    {
                        "type": "matches",
                        "string": "$env{MSYSTEM}",
                        "regex": "MINGW64"
                    },
                    {
                        "type": "matches",
                        "string": "$env{MSYSTEM}",
                        "regex": "UCRT64"
                    }
                ]
            }
        },
        {
            "name": "unixlike-gcc-debug",
            "displayName": "gcc Debug",
            "description": "Target Unix-like OS with the gcc compiler, debug build type",
            "inherits": "conf-unixlike-common",
            "cacheVariables": {
                "CMAKE_C_COMPILER": "gcc",
                "CMAKE_CXX_COMPILER": "g++",
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "unixlike-gcc-release",
            "displayName": "gcc Release",
            "description": "Target Unix-like OS with the gcc compiler, release build type",
            "inherits": "conf-unixlike-common",
            "cacheVariables": {
                "CMAKE_C_COMPILER": "gcc",
                "CMAKE_CXX_COMPILER": "g++",
                "CMAKE_BUILD_TYPE": "RelWithDebInfo"
            }
        },
        {
            "name": "unixlike-clang-debug",
            "displayName": "clang Debug",
            "description": "Target Unix-like OS with the clang compiler, debug build type",
            "inherits": "conf-unixlike-common",
            "cacheVariables": {
                "CMAKE_C_COMPILER": "clang",
                "CMAKE_CXX_COMPILER": "clang++",
                "CMAKE_BUILD_TYPE": "Debug"
            }
        },
        {
            "name": "unixlike-clang-release",
            "displayName": "clang Release",
            "description": "Target Unix-like OS with the clang compiler, release build type",
            "inherits": "conf-unixlike-common",
            "cacheVariables": {
                "CMAKE_C_COMPILER": "clang",
                "CMAKE_CXX_COMPILER": "clang++",
                "CMAKE_BUILD_TYPE": "RelWithDebInfo"
            }
        },
        {
            "name": "cmake-pedantic",
            "description": "Enables a minimal set of warnings and errors",
            "hidden": true,
            "warnings": {
                "dev": true,
                "deprecated": true,
                "uninitialized": false,
                "unusedCli": true,
                "systemVars": false
            },
            "errors": {
                "dev": true,
                "deprecated": true
            }
        },
        {
            "name": "default_options",
            "description": "Default configuration options. This should be inherited last to not override user options.",
            "hidden": true,
            "cacheVariables": {
                "BUILD_SHARED": "OFF",
                "ENABLE_TCMALLOC": "OFF",
                "OPTION_OMP": "ON",
                "WARNINGS_AS_ERRORS": "OFF",

                "WITH_JXL": "AUTO",
                "WITH_LTO": "OFF",
                "WITH_MYFILE_MMAP": "ON",
                "WITH_SAN": "OFF",
                "WITH_SYSTEM_KLT": "OFF",
                "WITH_SYSTEM_LIBRAW": "OFF",
                "SVG_BACKEND": "librsvg",
                "WITH_SYSTEM_LUNASVG": "OFF",

                "WITH_BENCHMARK": "OFF",
                "WITH_PROF": "OFF",
                "WITH_TRACY_PROFILER": "OFF",

                "STRICT_MUTEX": "ON",
                "TRACE_MYRWMUTEX": "OFF",
                "AUTO_GDK_FLUSH": "OFF"
            }
        },
        {
            "name": "dev-mode",
            "description": "Enable developer mode options",
            "hidden": true,
            "inherits": "cmake-pedantic",
            "cacheVariables": {
                "CACHE_NAME_SUFFIX": "5-dev",
                "PROC_TARGET_NUMBER": "2"
            }
        },
        {
            "name": "strict-warnings",
            "description": "Promote warnings to errors",
            "hidden": true,
            "inherits": "dev-mode",
            "cacheVariables": {
                "WARNINGS_AS_ERRORS": "ON"
            }
        },
        {
            "name": "dev",
            "inherits": ["dev-mode", "default_options", "unixlike-gcc-release"],
            "binaryDir": "${sourceDir}/build/dev",
            "installDir": "${sourceDir}/build/dev"
        },
        {
            "name": "dev-strict",
            "inherits": ["strict-warnings", "dev"]
        },
        {
            "name": "dev-debug",
            "inherits": ["dev-mode", "unixlike-gcc-debug"],
            "binaryDir": "${sourceDir}/build/debug",
            "installDir": "${sourceDir}/build/debug"
        }
    ],
    "buildPresets": [
        {
            "name": "dev",
            "configurePreset": "dev"
        },
        {
            "name": "dev-strict",
            "configurePreset": "dev-strict"
        },
        {
            "name": "dev-debug",
            "configurePreset": "dev-debug"
        }
    ]
}