From 89561229c43a4dc232798477c18224f7aae06ebb Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Mon, 1 Jul 2024 16:51:40 +0300 Subject: [PATCH] cmake: add android configs to presets --- CMakePresets.json | 23 +++++++++++++++++++++++ test/t-expected-11.cpp | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 43f4e07..e8e1b0a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -87,6 +87,29 @@ "name": "debug-aublsan", "description": "combining addr, ub and leak sanitizers is widely supported on many platforms", "inherits": ["base-debug", "asan", "ubsan", "lsan"] + }, + + { + "name": "android", + "hidden": true, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Android", + "CMAKE_SYSTEM_VERSION": "28", + "CMAKE_ANDROID_ARCH_ABI": "arm64-v8a", + "CMAKE_ANDROID_NDK": { + "value": "$env{ANDROID_NDK_ROOT}", + "type": "PATH" + }, + "CMAKE_ANDROID_STL_TYPE": "c++_static" + } + }, + { + "name": "debug-android", + "inherits": ["debug", "android"] + }, + { + "name": "release-android", + "inherits": ["release", "android"] } ] } diff --git a/test/t-expected-11.cpp b/test/t-expected-11.cpp index 13b2b33..e97f7bf 100644 --- a/test/t-expected-11.cpp +++ b/test/t-expected-11.cpp @@ -55,7 +55,7 @@ TEST_CASE("i/d") static_assert(std::is_same::value, "is_same"); static_assert(std::is_same::value, "is_same"); - ide a = 2.3; + ide a = 2.3; // must be cast to int CHECK(a.value_or(5) == 2); ide b = unexpected(7);