From 45488504483793195947a200f59527432ad5b31a Mon Sep 17 00:00:00 2001 From: Maksims Svecovs Date: Wed, 28 Sep 2022 14:43:07 +0100 Subject: MLECO-3518: Separates CMakePrests Separates CMakePresets to respective. Adds options preset file with log-level and single-input for use-cases. Adds use-case file with base build preset with all the targets. Adds a configurable targets to all build presets. Adds additional config/build preset to show-off options-presets. Signed-off-by: Maksims Svecovs Change-Id: Id82ce9c5b8d7cc48b80d784141dc22efa2690222 --- scripts/cmake/options-preset.json | 71 ++++++++++++++++++++++++++ scripts/cmake/platforms/platforms-preset.json | 62 ++++++++++++++++++++++ scripts/cmake/toolchains/toolchain-preset.json | 43 ++++++++++++++++ 3 files changed, 176 insertions(+) create mode 100644 scripts/cmake/options-preset.json create mode 100644 scripts/cmake/platforms/platforms-preset.json create mode 100644 scripts/cmake/toolchains/toolchain-preset.json (limited to 'scripts') diff --git a/scripts/cmake/options-preset.json b/scripts/cmake/options-preset.json new file mode 100644 index 0000000..57b7a7d --- /dev/null +++ b/scripts/cmake/options-preset.json @@ -0,0 +1,71 @@ +{ + "version": 4, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "log-trace", + "hidden": true, + "cacheVariables": { + "LOG_LEVEL": { + "type": "STRING", + "value": "LOG_LEVEL_TRACE" + } + } + }, + { + "name": "log-debug", + "hidden": true, + "cacheVariables": { + "LOG_LEVEL": { + "type": "STRING", + "value": "LOG_LEVEL_DEBUG" + } + } + }, + { + "name": "log-info", + "hidden": true, + "cacheVariables": { + "LOG_LEVEL": { + "type": "STRING", + "value": "LOG_LEVEL_INFO" + } + } + }, + { + "name": "log-warning", + "hidden": true, + "cacheVariables": { + "LOG_LEVEL": { + "type": "STRING", + "value": "LOG_LEVEL_WARN" + } + } + }, + { + "name": "log-error", + "hidden": true, + "cacheVariables": { + "LOG_LEVEL": { + "type": "STRING", + "value": "LOG_LEVEL_ERROR" + } + } + }, + { + "name": "single-input", + "hidden": true, + "description": "Use single default input data for each use case.", + "cacheVariables": { + "USE_SINGLE_INPUT": { + "type": "BOOL", + "value": "TRUE" + } + } + } + ] +} \ No newline at end of file diff --git a/scripts/cmake/platforms/platforms-preset.json b/scripts/cmake/platforms/platforms-preset.json new file mode 100644 index 0000000..7a96d7a --- /dev/null +++ b/scripts/cmake/platforms/platforms-preset.json @@ -0,0 +1,62 @@ +{ + "version": 4, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "mps3-300-platform", + "description": "Target mps3 board, SSE-300 subsystem.", + "hidden": true, + "cacheVariables": { + "TARGET_PLATFORM": { + "type": "STRING", + "value": "mps3" + }, + "TARGET_SUBSYSTEM": { + "type": "STRING", + "value": "sse-300" + } + } + }, + { + "name": "mps3-310-platform", + "description": "Target mps3 board, SSE-310 subsystem.", + "hidden": true, + "cacheVariables": { + "TARGET_PLATFORM": { + "type": "STRING", + "value": "mps3" + }, + "TARGET_SUBSYSTEM": { + "type": "STRING", + "value": "sse-310" + } + } + }, + { + "name": "simple-platform", + "description": "Target simple platform.", + "hidden": true, + "cacheVariables": { + "TARGET_PLATFORM": { + "type": "STRING", + "value": "simple_platform" + } + } + }, + { + "name": "native-platform", + "description": "Target native platform.", + "hidden": true, + "cacheVariables": { + "TARGET_PLATFORM": { + "type": "STRING", + "value": "native" + } + } + } + ] +} \ No newline at end of file diff --git a/scripts/cmake/toolchains/toolchain-preset.json b/scripts/cmake/toolchains/toolchain-preset.json new file mode 100644 index 0000000..728547f --- /dev/null +++ b/scripts/cmake/toolchains/toolchain-preset.json @@ -0,0 +1,43 @@ +{ + "version": 4, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "gcc-toolchain", + "description": "Use gcc toolchain.", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": { + "type": "STRING", + "value": "${sourceDir}/scripts/cmake/toolchains/bare-metal-gcc.cmake" + } + } + }, + { + "name": "armclang-toolchain", + "description": "Use armclang toolchain.", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": { + "type": "STRING", + "value": "${sourceDir}/scripts/cmake/toolchains/bare-metal-armclang.cmake" + } + } + }, + { + "name": "native-toolchain", + "description": "Use native toolchain.", + "hidden": true, + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": { + "type": "STRING", + "value": "${sourceDir}/scripts/cmake/toolchains/native-gcc.cmake" + } + } + } + ] +} \ No newline at end of file -- cgit v1.2.1