cmake: Remove presets

Presets never worked very well. Especially IDE's had troubles with them.
This commit is contained in:
Lukas Woodtli 2024-12-04 21:20:38 +01:00 committed by Lukas Woodtli
parent 76e8aed679
commit e5d7daba36
2 changed files with 0 additions and 325 deletions

View File

@ -1,309 +0,0 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"description": "Basic preset settings",
"hidden": true,
"binaryDir": "${sourceDir}/build-presets/${presetName}",
"cacheVariables": {
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_MODE_BOOTSTRAP_SERVER": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_PLATFORM": {
"type": "STRING",
"value": "POSIX"
}
}
},
{
"name": "server",
"description": "Build a server",
"inherits": "base",
"cacheVariables": {
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "bootstrap_server",
"description": "Build a bootstrap server",
"inherits": "base",
"cacheVariables": {
"WAKAAMA_MODE_BOOTSTRAP_SERVER": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "client",
"description": "Build a client",
"inherits": "base",
"cacheVariables": {
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_CLIENT_INITIATED_BOOTSTRAP": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_JSON": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_JSON": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_DATA_SENML_CBOR": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_DATA_TLV": {
"type": "BOOL",
"value": "OFF"
}
}
},
{
"name": "client_coap_raw_block1",
"description": "Build a client with CoAP raw block1 support",
"inherits": "client",
"cacheVariables": {
"WAKAAMA_COAP_RAW_BLOCK1_REQUESTS": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "test_base",
"description": "Run the tests with corresponding log level",
"hidden": true,
"inherits": "base",
"cacheVariables": {
"WAKAAMA_DATA_TLV": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_JSON": {
"type": "BOOL",
"value": "OFF"
}
}
},
{
"name": "log_base",
"description": "Run the tests with corresponding log level",
"hidden": true,
"inherits": "test_base",
"cacheVariables": {
"WAKAAMA_LOG_CUSTOM_HANDLER": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "log_dbg",
"description": "Run the tests with debug log level",
"inherits": "log_base",
"cacheVariables": {
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_LOG_LEVEL": {
"type": "STRING",
"value": "DBG"
}
}
},
{
"name": "log_warn",
"description": "Run the tests with warning log level",
"inherits": "log_base",
"cacheVariables": {
"WAKAAMA_MODE_BOOTSTRAP_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_LOG_LEVEL": {
"type": "STRING",
"value": "WARN"
}
}
},
{
"name": "log_fatal",
"description": "Run the tests with fatal log level",
"inherits": "log_base",
"cacheVariables": {
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_LOG_LEVEL": {
"type": "STRING",
"value": "FATAL"
}
}
},
{
"name": "client_1_0",
"description": "Run the tests for lwm2m 1.0 client",
"inherits": "test_base",
"cacheVariables": {
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_CLIENT_LWM2M_V_1_0": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_JSON": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_DATA_SENML_CBOR": {
"type": "BOOL",
"value": "OFF"
}
}
},
{
"name": "client_bootstrap",
"description": "Run the tests for client with client initiated bootstrap",
"inherits": "test_base",
"cacheVariables": {
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_CLIENT_INITIATED_BOOTSTRAP": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "client_server_bootstrap_all_formats",
"description": "Run the tests for Wakaama with most features enabled",
"inherits": "test_base",
"cacheVariables": {
"WAKAAMA_MODE_CLIENT": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_MODE_BOOTSTRAP_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_JSON": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_CBOR": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_OLD_CONTENT_FORMAT": {
"type": "BOOL",
"value": "ON"
}
}
},
{
"name": "server_formats_no_float16_blocksize_64",
"description": "Run the tests for server without float16 and blocksize 64",
"inherits": "test_base",
"cacheVariables": {
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_JSON": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_CBOR": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_CBOR_FLOAT16_SUPPORT": {
"type": "BOOL",
"value": "FALSE"
},
"WAKAAMA_COAP_DEFAULT_BLOCK_SIZE": {
"type": "STRING",
"value": "64"
}
}
}
],
"buildPresets": [
{
"name": "server",
"configurePreset": "server"
},
{
"name": "bootstrap_server",
"configurePreset": "bootstrap_server"
},
{
"name": "client",
"configurePreset": "client"
},
{
"name": "log_dbg",
"configurePreset": "log_dbg"
},
{
"name": "log_warn",
"configurePreset": "log_warn"
},
{
"name": "log_fatal",
"configurePreset": "log_fatal"
},
{
"name": "client_1_0",
"configurePreset": "client_1_0"
},
{
"name": "client_bootstrap",
"configurePreset": "client_bootstrap"
},
{
"name": "client_server_bootstrap_all_formats",
"configurePreset": "client_server_bootstrap_all_formats"
},
{
"name": "server_formats_no_float16_blocksize_64",
"configurePreset": "server_formats_no_float16_blocksize_64"
}
]
}

View File

@ -162,32 +162,16 @@ function run_build() {
# Existing directory needed by SonarQube build-wrapper
mkdir -p "${OPT_BUILD_DIRECTORY}"
echo "Default build"
${OPT_WRAPPER_CMD} cmake -GNinja -S ${OPT_SOURCE_DIRECTORY} -B "${OPT_BUILD_DIRECTORY}" \
-DWAKAAMA_PLATFORM=POSIX ${CMAKE_ARGS}
${OPT_WRAPPER_CMD} cmake --build "${OPT_BUILD_DIRECTORY}"
# CMake presets
echo "CMake presets build"
for i in $(cmake --list-presets build | awk '/"/{ print $1 }' | tr -d '"');do
echo "CMake preset $i"
${OPT_WRAPPER_CMD} cmake --preset "$i" -G Ninja ${CMAKE_ARGS}
${OPT_WRAPPER_CMD} cmake --build --preset "$i"
done
}
function run_tests() {
export CTEST_OUTPUT_ON_FAILURE=ON
echo "Default test run"
cmake --build "${OPT_BUILD_DIRECTORY}" --target test
echo "CMake presets test run"
for i in $(cmake --list-presets build | awk '/"/{ print $1 }' | tr -d '"');do
echo "CMake preset $i"
cmake --build --preset "$i" --target test
done
mkdir -p "${REPO_ROOT_DIR}/${OPT_BUILD_DIRECTORY}/coverage"
if [ -z "${OPT_TEST_COVERAGE_REPORT}" ]; then