Files
MapLibreParticleLab/cmake/test.cmake
Thiago Marcos P. Santos bcbbc7e5f3 [build] Add vendored libboost
Custom extract made using bcp based on 1.65.1
2018-11-01 16:29:37 +02:00

52 lines
1.3 KiB
CMake

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
)
target_add_mason_package(mbgl-test PRIVATE pixelmatch)
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"
)