From e626a6ee6dffb6f98c05e512a29438b6a101e37b Mon Sep 17 00:00:00 2001 From: Jakub Szewczyk Date: Mon, 29 Nov 2021 11:26:37 +0000 Subject: [PATCH] Add a CMake preset for local building outside of containers --- .gitignore | 1 + CMakePresets.json | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 CMakePresets.json diff --git a/.gitignore b/.gitignore index 94280d5c0..cf825addb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build/ +work/ # Clang .clangd diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..0381b3329 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,65 @@ +{ + "version": 3, + "cmakeMinimumRequired": { + "major": 3, + "minor": 21, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default Config (Debug)", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceDir}/work/debug", + "cacheVariables": { + "CMAKE_INSTALL_PREFIX": { + "type": "STRING", + "value": "${sourceDir}/work/debuginstall" + }, + "CMAKE_BUILD_TYPE": { + "type": "STRING", + "value": "Debug" + }, + "CMAKE_EXPORT_COMPILE_COMMANDS": { + "type": "BOOL", + "value": true + }, + "BUILD_SHARED_LIBS": { + "type": "BOOL", + "value": false + }, + "CMAKE_CXX_COMPILER": { + "type": "FILEPATH", + "value": "/usr/bin/clang++" + }, + "CMAKE_C_COMPILER": { + "type": "FILEPATH", + "value": "/usr/bin/clang" + } + }, + "environment": {}, + "vendor": {} + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default", + "output": { + "outputOnFailure": true + }, + "execution": { + "noTestsAction": "error", + "stopOnFailure": true + } + } + ], + "vendor": {} +} \ No newline at end of file