diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2019-12-17 14:51:04 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-03 11:52:50 +0200 |
commit | ee66940409ab5e0b5128fedcd889238f1f76f3c8 (patch) | |
tree | 04191d57dab6bcd8d6032f4389af1f8068c9ed1f /next/platform | |
parent | 6d876f1d6bf95827598809b965ed6a6e06008675 (diff) | |
download | qtlocation-mapboxgl-ee66940409ab5e0b5128fedcd889238f1f76f3c8.tar.gz |
[benchmark] Run benchmark as NativeActivity application on Android
Diffstat (limited to 'next/platform')
-rw-r--r-- | next/platform/android/android.cmake | 48 | ||||
-rw-r--r-- | next/platform/linux/linux.cmake | 6 |
2 files changed, 49 insertions, 5 deletions
diff --git a/next/platform/android/android.cmake b/next/platform/android/android.cmake index c60704d542..89eddaaae6 100644 --- a/next/platform/android/android.cmake +++ b/next/platform/android/android.cmake @@ -334,19 +334,59 @@ target_link_libraries( mbgl-test ) -add_executable( +add_library( + mbgl-benchmark-runner SHARED + ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c + ${MBGL_ROOT}/platform/android/src/test/benchmark_runner.cpp + ${MBGL_ROOT}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp + ${MBGL_ROOT}/platform/android/src/test/render_test_collator.cpp + ${MBGL_ROOT}/platform/android/src/test/render_test_number_format.cpp + ${MBGL_ROOT}/platform/default/src/mbgl/storage/file_source.cpp + ${MBGL_ROOT}/platform/default/src/mbgl/storage/default_file_source.cpp +) + +target_include_directories( mbgl-benchmark-runner - ${MBGL_ROOT}/platform/android/src/test/benchmark_runner.cpp ${MBGL_ROOT}/platform/android/src/test/runtime.cpp - ${MBGL_ROOT}/platform/android/src/test/runtime.hpp + PRIVATE + ${ANDROID_NDK}/sources/android/native_app_glue + ${MBGL_ROOT}/platform/android/src + ${MBGL_ROOT}/src + ${MBGL_ROOT}/platform/default/include ) target_link_libraries( mbgl-benchmark-runner PRIVATE Mapbox::Base::jni.hpp - mapbox-gl + android + log mbgl-compiler-options + -Wl,--whole-archive mbgl-benchmark + -Wl,--no-whole-archive +) + +add_custom_command( + TARGET mbgl-benchmark-runner PRE_BUILD + COMMAND + ${CMAKE_COMMAND} + -E + make_directory + ${MBGL_ROOT}/benchmark/results + COMMAND + ${CMAKE_COMMAND} + -E + tar + "chf" + "benchmark/android/app/src/main/assets/data.zip" + --format=zip + --files-from=benchmark/android/app/src/main/assets/to_zip.txt + COMMAND + ${CMAKE_COMMAND} + -E + remove_directory + ${MBGL_ROOT}/benchmark/results + WORKING_DIRECTORY ${MBGL_ROOT} ) add_library( diff --git a/next/platform/linux/linux.cmake b/next/platform/linux/linux.cmake index 8ff02db1ba..98787eb04a 100644 --- a/next/platform/linux/linux.cmake +++ b/next/platform/linux/linux.cmake @@ -106,7 +106,11 @@ add_executable( target_link_libraries( mbgl-benchmark-runner - PRIVATE mbgl-compiler-options mbgl-benchmark + PRIVATE + mbgl-compiler-options + -Wl,--whole-archive + mbgl-benchmark + -Wl,--no-whole-archive ) add_executable( |