summaryrefslogtreecommitdiff
path: root/cmake/benchmark.cmake
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-10-04 17:26:08 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2016-10-05 11:12:16 +0300
commit5829c0dbc6e7785cec5af12891ba2ead784d1a69 (patch)
treec01a0f92e093316b44a23e0aac27ae38c5b538ce /cmake/benchmark.cmake
parentdd604a7b3650617ab3fef81eef1a63fc28761396 (diff)
downloadqtlocation-mapboxgl-5829c0dbc6e7785cec5af12891ba2ead784d1a69.tar.gz
[build] Re-add benchmark tests to the buildsystem
Probably lost on the cmake migration
Diffstat (limited to 'cmake/benchmark.cmake')
-rw-r--r--cmake/benchmark.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/benchmark.cmake b/cmake/benchmark.cmake
new file mode 100644
index 0000000000..79da54459e
--- /dev/null
+++ b/cmake/benchmark.cmake
@@ -0,0 +1,32 @@
+add_executable(mbgl-benchmark
+ ${MBGL_BENCHMARK_FILES}
+)
+
+target_compile_options(mbgl-benchmark
+ PRIVATE -fvisibility-inlines-hidden
+)
+
+target_include_directories(mbgl-benchmark
+ PRIVATE include
+ PRIVATE src # TODO: eliminate
+ PRIVATE benchmark/include
+ PRIVATE benchmark/src
+ PRIVATE platform/default
+)
+
+if(DEFINED ENV{CI})
+ target_compile_definitions(mbgl-benchmark
+ PRIVATE -DCI_BUILD=1
+ )
+endif()
+
+target_link_libraries(mbgl-benchmark
+ PRIVATE mbgl-core
+)
+
+target_add_mason_package(mbgl-benchmark PRIVATE benchmark)
+target_add_mason_package(mbgl-benchmark PRIVATE rapidjson)
+
+mbgl_platform_benchmark()
+
+create_source_groups(mbgl-benchmark)