From 74a408d625ba07692e46fbd2dc8e375f9450a934 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Tue, 26 Aug 2025 13:03:47 +0200 Subject: [PATCH] chore(doc): CMake presets (#6546) --- .github/workflows/actions.yml | 2 ++ .gitignore | 1 + CMakePresets.json | 54 +++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 CMakePresets.json diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index ac236b2dc..84607dd4c 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -18,6 +18,7 @@ on: - 'companion/**' - '.gitpod.yml' - '.devcontainer/**' + - 'CMakeUserPresets.json' - 'fw.json' pull_request: branches: @@ -34,6 +35,7 @@ on: - 'companion/**' - '.gitpod.yml' - '.devcontainer/**' + - 'CMakeUserPresets.json' - 'fw.json' workflow_dispatch: diff --git a/.gitignore b/.gitignore index 5ef0767e0..6f195bb04 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ compile_commands.json /ys_Doc /.idea /.vs +CMakeUserPresets.json diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..9f44720a8 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,54 @@ +{ + "version": 6, + "configurePresets": [ + { + "name": "firmware", + "displayName": "Firmware", + "binaryDir": "build/fw", + "toolchainFile": "cmake/toolchain/arm-none-eabi.cmake", + "cacheVariables": { + "EdgeTX_SUPERBUILD": false, + "NATIVE_BUILD": false + } + }, + { + "name": "simu", + "displayName": "SDL Simu", + "binaryDir": "build/simu", + "toolchainFile": "cmake/toolchain/native.cmake", + "cacheVariables": { + "EdgeTX_SUPERBUILD": false, + "NATIVE_BUILD": true + }, + "warnings": { + "dev": false + } + } + ], + "buildPresets": [ + { + "name": "firmware", + "displayName": "Firmware", + "configurePreset": "firmware", + "targets": [ + "firmware" + ] + }, + { + "name": "simu", + "displayName": "SDL Simu", + "configurePreset": "simu", + "targets": [ + "simu" + ] + }, + { + "name": "tests-radio", + "displayName": "Radio Tests", + "configurePreset": "simu", + "targets": [ + "tests-radio" + ] + } + ] +}