summaryrefslogtreecommitdiff
path: root/CMakePresets.json
diff options
context:
space:
mode:
Diffstat (limited to 'CMakePresets.json')
-rw-r--r--CMakePresets.json61
1 files changed, 61 insertions, 0 deletions
diff --git a/CMakePresets.json b/CMakePresets.json
new file mode 100644
index 00000000..e11a6fbe
--- /dev/null
+++ b/CMakePresets.json
@@ -0,0 +1,61 @@
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "debug",
+ "displayName": "Debug",
+ "description": "Debug build",
+ "binaryDir": "${sourceDir}/cmake-build-debug",
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
+ "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wshadow -Werror=non-virtual-dtor",
+ "CMAKE_CXX_FLAGS_DEBUG": "-g -Og",
+ "CMAKE_CXX_STANDARD": "20",
+ "CMAKE_CXX_STANDARD_REQUIRED": "YES",
+ "CMAKE_CXX_CLANG_TIDY": "clang-tidy",
+ "MEMORYCHECK_COMMAND": "valgrind",
+ "MEMORYCHECK_COMMAND_OPTIONS": "--leak-check=full --show-leak-kinds=all --gen-suppressions=all"
+ }
+ },
+ {
+ "name": "coverage",
+ "inherits": "debug",
+ "binaryDir": "${sourceDir}/cmake-build-coverage",
+ "cacheVariables": {
+ "BUILD_COVERAGE": "ON",
+ "CMAKE_CXX_CLANG_TIDY": ""
+ }
+ },
+ {
+ "name": "release",
+ "displayName": "Release",
+ "description": "Release build",
+ "binaryDir": "${sourceDir}/cmake-build-release",
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Release",
+ "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
+ "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wshadow -Werror=non-virtual-dtor",
+ "CMAKE_CXX_FLAGS_RELEASE": "-O2",
+ "CMAKE_CXX_STANDARD": "20",
+ "CMAKE_CXX_STANDARD_REQUIRED": "YES"
+ }
+ }
+ ],
+ "buildPresets": [
+ { "name": "debug", "configurePreset": "debug" },
+ { "name": "release", "configurePreset": "release" }
+ ],
+ "testPresets": [
+ {
+ "name": "debug",
+ "configurePreset": "debug",
+ "output": { "outputOnFailure": true },
+ "execution": { "stopOnFailure": false }
+ },
+ {
+ "name": "release",
+ "configurePreset": "release"
+ }
+ ]
+}