blob: 053ba92d7651d2c0d099010f4d8c39bc3d532afd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
add_vendor_target(gtest STATIC)
# Modify cmake/test-files.txt to change the source files for this target.
load_sources_list(MBGL_TEST_FILES cmake/test-files.txt)
if (MBGL_TEST_TARGET_TYPE STREQUAL "library")
add_library(mbgl-test SHARED ${MBGL_TEST_FILES})
else()
add_executable(mbgl-test ${MBGL_TEST_FILES})
endif()
if(NOT WITH_NODEJS)
target_compile_definitions(mbgl-test PRIVATE "-DTEST_HAS_SERVER=0")
endif()
set_source_files_properties(test/src/mbgl/test/util.cpp PROPERTIES COMPILE_FLAGS -DNODE_EXECUTABLE="${NodeJS_EXECUTABLE}")
target_include_directories(mbgl-test
PRIVATE src
PRIVATE test/include
PRIVATE test/src
PRIVATE platform/default
)
target_link_libraries(mbgl-test PRIVATE
gtest
mbgl-core
shelf-pack-cpp
unique_resource
pixelmatch-cpp
)
mbgl_platform_test()
create_source_groups(mbgl-test)
initialize_xcode_cxx_build_settings(mbgl-test)
set_target_properties(mbgl-test PROPERTIES FOLDER "Executables")
xcode_create_scheme(
TARGET mbgl-test
OPTIONAL_ARGS
"--gtest_filter=Category.*"
"--gtest_repeat=0"
"--gtest_shuffle=0"
"--gtest_break_on_failure=0"
"--gtest_throw_on_failure=0"
"--gtest_catch_exceptions=0"
)
|