From 86d2e928f200613da4232e7a53070c35a5848f02 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Wed, 7 Nov 2018 11:50:12 +0200 Subject: [core] Vendor libbenchmark Prebuilt binaries for libbenchmark might be incompatible with some environments, for example, when mbgl-benchmark target is compiled on host with GCC and linked against mason's clang 5.0 compiled binaries. Vendored libbenchmark avoids aforementioned issue, as the target and the binary compiled with same compiler / options. --- cmake/benchmark.cmake | 3 +-- cmake/mason-dependencies.cmake | 2 -- cmake/vendor.cmake | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/benchmark.cmake b/cmake/benchmark.cmake index dd47766b9e..b5452a573a 100644 --- a/cmake/benchmark.cmake +++ b/cmake/benchmark.cmake @@ -11,10 +11,9 @@ target_include_directories(mbgl-benchmark target_link_libraries(mbgl-benchmark PRIVATE mbgl-core + PRIVATE benchmark ) -target_add_mason_package(mbgl-benchmark PRIVATE benchmark) - mbgl_platform_benchmark() create_source_groups(mbgl-benchmark) diff --git a/cmake/mason-dependencies.cmake b/cmake/mason-dependencies.cmake index b5b1b74075..3a7a3f2ef0 100644 --- a/cmake/mason-dependencies.cmake +++ b/cmake/mason-dependencies.cmake @@ -12,7 +12,6 @@ elseif(MBGL_PLATFORM STREQUAL "linux") mason_use(libuv VERSION 1.9.1) mason_use(libpng VERSION 1.6.25) mason_use(libjpeg-turbo VERSION 1.5.0) - mason_use(benchmark VERSION 1.4.1${MASON_CXXABI_SUFFIX}) mason_use(args VERSION 6.2.0 HEADER_ONLY) if(WITH_EGL) @@ -20,7 +19,6 @@ elseif(MBGL_PLATFORM STREQUAL "linux") endif() elseif(MBGL_PLATFORM STREQUAL "macos") mason_use(glfw VERSION 2018-06-27-0be4f3f) - mason_use(benchmark VERSION 1.4.1) mason_use(args VERSION 6.2.0 HEADER_ONLY) if(WITH_EGL) diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake index e66a0cad28..760754486e 100644 --- a/cmake/vendor.cmake +++ b/cmake/vendor.cmake @@ -3,6 +3,7 @@ execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/vendor ) +include(${CMAKE_SOURCE_DIR}/vendor/benchmark.cmake) include(${CMAKE_SOURCE_DIR}/vendor/boost.cmake) include(${CMAKE_SOURCE_DIR}/vendor/earcut.hpp.cmake) include(${CMAKE_SOURCE_DIR}/vendor/expected.cmake) -- cgit v1.2.1