mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Starting with CMake 3.30 and CMakePresets version 9, the include field supports interesting macro expansions. We can now define platform specific presets in separate files and include them in the top-level CMakePresets.json, while keeping the same preset names across all platforms. This avoids some preset explosion at the cost of some mostly empty json files for each unix platform. The CMake minimum required in the top-level and Lagom CMakeLists.txt have not been adjusted in this patch, as that would have the effect of changing the default policy versions and is a bit out of scope.
64 lines
1.6 KiB
JSON
64 lines
1.6 KiB
JSON
{
|
|
"version": 9,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 30,
|
|
"patch": 0
|
|
},
|
|
"include": [
|
|
"Meta/CMake/presets/CMake${hostSystemName}Presets.json"
|
|
],
|
|
"buildPresets": [
|
|
{
|
|
"name": "Release",
|
|
"inherits": "base",
|
|
"configurePreset": "Release",
|
|
"displayName": "Release Build",
|
|
"description": "Build the project in release"
|
|
},
|
|
{
|
|
"name": "Debug",
|
|
"inherits": "base",
|
|
"configurePreset": "Debug",
|
|
"displayName": "Debug Build",
|
|
"description": "Build the project in debug"
|
|
},
|
|
{
|
|
"name": "Sanitizer",
|
|
"inherits": "base",
|
|
"configurePreset": "Sanitizer",
|
|
"displayName": "Sanitizer Build",
|
|
"description": "Build the project with Sanitizers on Unix"
|
|
}
|
|
],
|
|
"testPresets": [
|
|
{
|
|
"hidden": true,
|
|
"name": "root_base",
|
|
"inherits": "base",
|
|
"environment": {
|
|
"LADYBIRD_SOURCE_DIR": "${fileDir}"
|
|
}
|
|
},
|
|
{
|
|
"name": "Release",
|
|
"inherits": "root_base",
|
|
"configurePreset": "Release"
|
|
},
|
|
{
|
|
"name": "Debug",
|
|
"inherits": "root_base",
|
|
"configurePreset": "Debug"
|
|
},
|
|
{
|
|
"name": "Sanitizer",
|
|
"inherits": "root_base",
|
|
"configurePreset": "Sanitizer",
|
|
"environment": {
|
|
"ASAN_OPTIONS": "strict_string_checks=1:check_initialization_order=1:strict_init_order=1:detect_stack_use_after_return=1:allocator_may_return_null=1:$penv{ASAN_OPTIONS}",
|
|
"UBSAN_OPTIONS": "print_stacktrace=1:print_summary=1:halt_on_error=1:$penv{UBSAN_OPTIONS}"
|
|
}
|
|
}
|
|
]
|
|
}
|