diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-10-05 15:13:02 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2016-10-05 15:34:30 +0300 |
commit | 214ec4e96ad71d8ffefe1c12292ec77b58bd3fb2 (patch) | |
tree | b09019123d9c7428f7c1d8f0c3972ac0da474913 /platform | |
parent | dd7713f6ee55a15b4ec5228a46a13c184dfdc01f (diff) | |
download | qtlocation-mapboxgl-214ec4e96ad71d8ffefe1c12292ec77b58bd3fb2.tar.gz |
[build] Add support for 'benchmark' target on macOS
Diffstat (limited to 'platform')
-rw-r--r-- | platform/macos/bitrise.yml | 10 | ||||
-rw-r--r-- | platform/macos/config.cmake | 22 |
2 files changed, 32 insertions, 0 deletions
diff --git a/platform/macos/bitrise.yml b/platform/macos/bitrise.yml index f1226f8842..6d51b4878e 100644 --- a/platform/macos/bitrise.yml +++ b/platform/macos/bitrise.yml @@ -43,6 +43,16 @@ workflows: make xproj - is_debug: 'yes' - script: + title: Build Benchmark Tests + run_if: '{{enveq "SKIPCI" "false"}}' + inputs: + - content: |- + #!/bin/bash + set -eu -o pipefail + export BUILDTYPE=Debug + make benchmark + - is_debug: 'yes' + - script: title: Run Core Tests run_if: '{{enveq "SKIPCI" "false"}}' inputs: diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake index 8f64cb89aa..f8d4ab398f 100644 --- a/platform/macos/config.cmake +++ b/platform/macos/config.cmake @@ -3,6 +3,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10) mason_use(glfw VERSION 3.2.1) mason_use(boost_libprogram_options VERSION 1.60.0) mason_use(gtest VERSION 1.7.0${MASON_CXXABI_SUFFIX}) +mason_use(benchmark VERSION 1.0.0) include(cmake/loop-darwin.cmake) @@ -112,6 +113,27 @@ macro(mbgl_platform_test) ) endmacro() +macro(mbgl_platform_benchmark) + target_sources(mbgl-benchmark + PRIVATE benchmark/src/main.cpp + ) + + set_source_files_properties( + benchmark/src/main.cpp + PROPERTIES + COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}" + ) + + target_link_libraries(mbgl-benchmark + PRIVATE mbgl-loop + PRIVATE "-framework Foundation" + PRIVATE "-framework CoreGraphics" + PRIVATE "-framework OpenGL" + PRIVATE "-framework ImageIO" + PRIVATE "-framework CoreServices" + PRIVATE "-lsqlite3" + ) +endmacro() macro(mbgl_platform_node) target_link_libraries(mbgl-node |