mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
73a41d8e34
Compiling nextcoud gui as a separate library. This is needed to more easily write tests. The whole nextcloud application can now be linked against the tests. Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
26 lines
623 B
CMake
26 lines
623 B
CMake
project(tests)
|
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMOCKA_INCLUDE_DIR}
|
|
${CHECK_INCLUDE_DIRS}
|
|
${CMAKE_BINARY_DIR}/src/csync
|
|
)
|
|
|
|
# create test library
|
|
add_library(${TORTURE_LIBRARY} STATIC torture.c cmdline.c)
|
|
target_link_libraries(${TORTURE_LIBRARY} ${CMOCKA_LIBRARIES})
|
|
|
|
set(TEST_TARGET_LIBRARIES ${TORTURE_LIBRARY} Qt5::Core "${csync_NAME}")
|
|
|
|
# create tests
|
|
|
|
# std
|
|
|
|
add_cmocka_test(check_std_c_jhash std_tests/check_std_c_jhash.c ${TEST_TARGET_LIBRARIES})
|
|
|
|
# vio
|
|
add_cmocka_test(check_vio_ext vio_tests/check_vio_ext.cpp ${TEST_TARGET_LIBRARIES})
|