summaryrefslogtreecommitdiff
path: root/expression-test
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-02-07 16:38:14 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-02-07 20:12:44 +0200
commitf7fef70e9ddb9f52b071703d3ff0683b921606ac (patch)
treebbb1c1bf6f9d9a871c8d45e69286f9a0c44224ca /expression-test
parent489adb8d8713928fbbd1f511640417b1dd2aaa8a (diff)
downloadqtlocation-mapboxgl-f7fef70e9ddb9f52b071703d3ff0683b921606ac.tar.gz
[build] Move the `next` buildsystem to the root
This will make the `next` buildsystem no longer the `next`, but the `actual`. The idea is to simplify the build, removing scripts, to make the platform buildsystem generated by CMake more compatible with IDEs and make development more streamlined. It will also make cross compilation easier.
Diffstat (limited to 'expression-test')
-rw-r--r--expression-test/CMakeLists.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/expression-test/CMakeLists.txt b/expression-test/CMakeLists.txt
new file mode 100644
index 0000000000..5f8f8758a2
--- /dev/null
+++ b/expression-test/CMakeLists.txt
@@ -0,0 +1,38 @@
+add_executable(
+ mbgl-expression-test
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_logger.cpp
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_logger.hpp
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_parser.cpp
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_parser.hpp
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_runner.cpp
+ ${PROJECT_SOURCE_DIR}/expression-test/expression_test_runner.hpp
+ ${PROJECT_SOURCE_DIR}/expression-test/test_runner_common.cpp
+ ${PROJECT_SOURCE_DIR}/expression-test/test_runner_common.hpp
+ ${PROJECT_SOURCE_DIR}/expression-test/main.cpp
+)
+
+target_compile_definitions(
+ mbgl-expression-test
+ PRIVATE TEST_RUNNER_ROOT_PATH="${PROJECT_SOURCE_DIR}"
+)
+
+# FIXME: Should not use core private interface
+target_include_directories(
+ mbgl-expression-test
+ PRIVATE ${PROJECT_SOURCE_DIR}/src
+)
+
+target_link_libraries(
+ mbgl-expression-test
+ PRIVATE
+ Mapbox::Base::Extras::args
+ Mapbox::Base::Extras::filesystem
+ Mapbox::Base::io
+ mbgl-core
+)
+
+set_property(TARGET mbgl-expression-test PROPERTY FOLDER Executables)
+
+string(RANDOM LENGTH 5 ALPHABET 0123456789 MBGL_EXPRESSION_TEST_SEED)
+
+add_test(NAME mbgl-expression-test COMMAND mbgl-expression-test -s --seed=${MBGL_EXPRESSION_TEST_SEED} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})