Add CMake presets.

This commit is contained in:
tastytea 2021-06-03 15:44:31 +02:00
parent d83f485fb4
commit 85a00bb23c
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 53 additions and 0 deletions

53
CMakePresets.json Normal file
View File

@ -0,0 +1,53 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 0
},
"configurePresets": [
{
"name": "common",
"hidden": true,
"generator": "Unix Makefiles",
"binaryDir": "build",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true
}
},
{
"name": "dev",
"displayName": "Developer config",
"description": "Build with debug symbols and tests enabled",
"inherits": "common",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"WITH_TESTS": true
}
},
{
"name": "release",
"displayName": "Release config",
"description": "Build without debug symbols or tests",
"inherits": "common",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"WITH_TESTS": false
}
}
],
"testPresets": [
{
"name": "default",
"configurePreset": "dev",
"output": {
"verbosity": "verbose",
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
}
]
}