summaryrefslogtreecommitdiff
path: root/vendor/benchmark.cmake
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2018-11-07 11:50:12 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2018-11-08 14:19:23 +0200
commit86d2e928f200613da4232e7a53070c35a5848f02 (patch)
tree5e5c1182a1235cbae55fef05b3538c47b54cc19c /vendor/benchmark.cmake
parent7cee81abfa12ab4897de45188b787a43f652ef9f (diff)
downloadqtlocation-mapboxgl-86d2e928f200613da4232e7a53070c35a5848f02.tar.gz
[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.
Diffstat (limited to 'vendor/benchmark.cmake')
-rw-r--r--vendor/benchmark.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/benchmark.cmake b/vendor/benchmark.cmake
new file mode 100644
index 0000000000..516e3cd333
--- /dev/null
+++ b/vendor/benchmark.cmake
@@ -0,0 +1,25 @@
+add_library(benchmark STATIC
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/commandlineflags.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/console_reporter.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/complexity.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/csv_reporter.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/colorprint.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/sleep.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/benchmark.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/counter.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/benchmark_register.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/statistics.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/json_reporter.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/reporter.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/string_util.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/sysinfo.cc
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/src/timers.cc
+)
+
+target_compile_definitions(benchmark PRIVATE
+ HAVE_STEADY_CLOCK
+)
+
+target_include_directories(benchmark SYSTEM PUBLIC
+ ${CMAKE_SOURCE_DIR}/vendor/benchmark/include
+)