summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-02 17:46:15 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-09-04 10:37:50 +0300
commit631bc4f6a3ff7518787a8a3db76b252e96198a07 (patch)
tree95d527bb7da3d31f6d7810e0f26fa16d7bc07e9f /cmake
parentc7be3d52a709c98e93384bdcabc5cebc7adb9dac (diff)
downloadqtlocation-mapboxgl-631bc4f6a3ff7518787a8a3db76b252e96198a07.tar.gz
[core] Add native expression test runner
Diffstat (limited to 'cmake')
-rw-r--r--cmake/expression-test.cmake27
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/expression-test.cmake b/cmake/expression-test.cmake
new file mode 100644
index 0000000000..6c5b71a4f6
--- /dev/null
+++ b/cmake/expression-test.cmake
@@ -0,0 +1,27 @@
+add_executable(mbgl-expression-test
+ expression-test/main.cpp
+ expression-test/expression_test_parser.cpp
+ expression-test/expression_test_runner.cpp
+ expression-test/expression_test_logger.cpp
+)
+
+if(APPLE)
+ target_link_libraries(mbgl-expression-test PRIVATE mbgl-loop-darwin)
+else()
+ target_link_libraries(mbgl-expression-test PRIVATE mbgl-loop-uv)
+endif()
+
+target_include_directories(mbgl-expression-test
+ PRIVATE src
+ PRIVATE expression-test
+ PRIVATE render-test
+)
+
+target_link_libraries(mbgl-expression-test PRIVATE
+ mbgl-core
+ Mapbox::Base::Extras::args
+ Mapbox::Base::Extras::filesystem
+ Mapbox::Base::Extras::rapidjson
+)
+
+add_definitions(-DTEST_RUNNER_ROOT_PATH="${CMAKE_SOURCE_DIR}")