From e0e78c8659f56d5e2c3d77dc315fd2981a4c573a Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 12 Apr 2021 07:13:07 +0200 Subject: [PATCH] Add cmake preset support --- CMakePresets.json | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 CMakePresets.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..e010ea6c --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,56 @@ +{ + "version": 1, + "configurePresets": [ + { + "name": "dev", + "displayName": "Build as debug", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "asan", + "displayName": "Build with Asan support.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-asan", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "ECM_ENABLE_SANITIZERS" : "'address;undefined'", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "release", + "displayName": "Build as release mode.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-release", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "profile", + "displayName": "profile", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-profile", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + }, + { + "name": "unity", + "displayName": "Build with CMake unity support.", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-unity", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_UNITY_BUILD": "ON", + "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" + } + } + ] +}