Skip to content

Commit

Permalink
cmake: add android configs to presets
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Jul 1, 2024
1 parent bf31d36 commit 8956122
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
]
}
2 changes: 1 addition & 1 deletion test/t-expected-11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TEST_CASE("i/d")
static_assert(std::is_same<ide::value_type, int>::value, "is_same");
static_assert(std::is_same<ide::error_type, double>::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);
Expand Down

0 comments on commit 8956122

Please sign in to comment.