-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36c3a36
commit 8c4d0ab
Showing
12 changed files
with
485 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.24) | ||
cmake_minimum_required(VERSION 3.27) | ||
|
||
project("mimicssl-md5" VERSION 1.0.0) | ||
|
||
cmake_policy(SET CMP0142 NEW) | ||
|
||
include(CTest) | ||
|
||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") | ||
|
||
add_subdirectory(libmimicssl-md5) | ||
add_subdirectory(mimicssl-md5-cli) | ||
|
||
option(BUILD_TESTSUITE "Build testsuite" ON) | ||
if (${BUILD_TESTSUITE}) | ||
include(CTest) | ||
add_subdirectory(testsuite) | ||
endif() | ||
add_subdirectory(testsuite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/bin/sh | ||
|
||
if [ "$#" = 0 ] ; then | ||
echo usage: $0 BUILD_DIR configure ABI [CMAKE_OPTIONS...] | ||
echo usage: $0 BUILD_DIR test ABI | ||
exit 1 | ||
fi | ||
root_build_dir="$1" | ||
shift | ||
|
||
# Environment variables: | ||
# ANDROID_NDK (e.g., "$HOME/Library/Android/sdk/ndk/25.2.9519653") | ||
# ANDROID_HOME (e.g., "$HOME/Library/Android/sdk") | ||
|
||
# ABI: | ||
# "x86" | ||
# "x86_64" | ||
# "arm64-v8a" | ||
# "armeabi-v7a" | ||
|
||
# Options: | ||
# -DCMAKE_INSTALL_PREFIX:PATH="$HOME/android/$ABI" | ||
|
||
check_abi() { | ||
abi=$1 | ||
case "$abi" in | ||
x86|x86_64|arm64-v8a|armeabi-v7a) | ||
;; | ||
*) | ||
echo unknown ABI: $abi | ||
exit 1 | ||
esac | ||
} | ||
|
||
if [ "$#" = "0" ] ; then | ||
echo COMMAND not specified | ||
exit 1 | ||
fi | ||
command="$1" | ||
shift | ||
|
||
case "$command" in | ||
configure) | ||
if [ "$#" = "0" ] ; then | ||
echo ABI not specified | ||
exit 1 | ||
fi | ||
abi="$1" | ||
shift | ||
check_abi $abi | ||
build_dir="$root_build_dir/$abi" | ||
rm -rf $build_dir || exit 1 | ||
if [ "$abi" = "armeabi-v7a" ] ; then | ||
EXTRA_ARGS='-DCMAKE_ANDROID_ARM_NEON=ON' | ||
fi | ||
cmake -S . -B "$build_dir" -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_SYSTEM_NAME=Android \ | ||
-DCMAKE_CROSSCOMPILING_EMULATOR="$PWD/emulator-android.sh" \ | ||
-DCMAKE_SYSTEM_VERSION="21" \ | ||
-DCMAKE_ANDROID_ARCH_ABI="$abi" \ | ||
-DCMAKE_ANDROID_NDK="$ANDROID_NDK" \ | ||
$EXTRA_ARGS "$@" || exit 1 | ||
;; | ||
test) | ||
if [ "$#" = "0" ] ; then | ||
echo ABI not specified | ||
exit 1 | ||
fi | ||
abi="$1" | ||
shift | ||
check_abi $abi | ||
build_dir="$root_build_dir/$abi" | ||
sh emulator-android.sh --adb-push "$build_dir/testsuite" | ||
ctest --test-dir "$build_dir" -C Release -V || exit 1 | ||
sh emulator-android.sh --adb-pull "$build_dir/testsuite" | ||
;; | ||
*) | ||
echo unknown command: $command | ||
exit 1 | ||
esac | ||
exit 0 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.