88 lines
2.8 KiB
JSON
88 lines
2.8 KiB
JSON
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# SPDX-FileCopyrightText: 2025 ai-ad4 and the FreePDFEditor contributors
|
|
{
|
|
"$schema": "https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json",
|
|
"version": 6,
|
|
"cmakeMinimumRequired": { "major": 3, "minor": 28, "patch": 0 },
|
|
"configurePresets": [
|
|
{
|
|
"name": "base",
|
|
"hidden": true,
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
|
"VCPKG_MANIFEST_MODE": "ON",
|
|
"VCPKG_OVERLAY_PORTS": "${sourceDir}/cmake/vcpkg-ports"
|
|
},
|
|
"generator": "Ninja"
|
|
},
|
|
{
|
|
"name": "default",
|
|
"displayName": "Default (Release, vcpkg system toolchain)",
|
|
"inherits": "base",
|
|
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"displayName": "Debug",
|
|
"inherits": "base",
|
|
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
|
|
},
|
|
{
|
|
"name": "asan",
|
|
"displayName": "Debug + AddressSanitizer + UBSan",
|
|
"inherits": "base",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_CXX_FLAGS_INIT": "-fsanitize=address,undefined -fno-omit-frame-pointer",
|
|
"CMAKE_C_FLAGS_INIT": "-fsanitize=address,undefined -fno-omit-frame-pointer",
|
|
"CMAKE_EXE_LINKER_FLAGS_INIT": "-fsanitize=address,undefined",
|
|
"CMAKE_SHARED_LINKER_FLAGS_INIT": "-fsanitize=address,undefined"
|
|
},
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Linux"
|
|
}
|
|
},
|
|
{
|
|
"name": "tsan",
|
|
"displayName": "Debug + ThreadSanitizer",
|
|
"inherits": "base",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_CXX_FLAGS_INIT": "-fsanitize=thread -fno-omit-frame-pointer",
|
|
"CMAKE_EXE_LINKER_FLAGS_INIT": "-fsanitize=thread"
|
|
},
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Linux"
|
|
}
|
|
},
|
|
{
|
|
"name": "ci-release",
|
|
"displayName": "CI Release (warnings as errors, LTO)",
|
|
"inherits": "default",
|
|
"cacheVariables": {
|
|
"FREEPDFEDITOR_TREAT_WARNINGS_AS_ERRORS": "ON",
|
|
"FREEPDFEDITOR_ENABLE_LTO": "ON"
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{ "name": "default", "configurePreset": "default" },
|
|
{ "name": "debug", "configurePreset": "debug" },
|
|
{ "name": "asan", "configurePreset": "asan" },
|
|
{ "name": "tsan", "configurePreset": "tsan" },
|
|
{ "name": "ci-release", "configurePreset": "ci-release" }
|
|
],
|
|
"testPresets": [
|
|
{
|
|
"name": "default",
|
|
"configurePreset": "default",
|
|
"output": { "outputOnFailure": true },
|
|
"execution": { "noTestsAction": "error", "stopOnFailure": false }
|
|
}
|
|
]
|
|
} |