1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

adds dynamic test discover support

This commit is contained in:
nosamad 2019-03-03 15:14:32 +01:00
parent 4fc51d3382
commit bf6077a942

View File

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.1) cmake_minimum_required (VERSION 3.10)
project(fuse-wsfs VERSION 0.1.0 DESCRIPTION "Websocket filesystem based on libfuse") project(fuse-wsfs VERSION 0.1.0 DESCRIPTION "Websocket filesystem based on libfuse")
option(WITHOUT_TESTS "disable unit tests" OFF) option(WITHOUT_TESTS "disable unit tests" OFF)
@ -183,6 +183,7 @@ endif(NOT WITHOUT_EXAMPLE)
if(NOT WITHOUT_TESTS) if(NOT WITHOUT_TESTS)
pkg_check_modules(GTEST gtest_main) pkg_check_modules(GTEST gtest_main)
include(GoogleTest)
add_library(wsfs-adapter-static STATIC ${WSFS_ADAPTER_SOURCES}) add_library(wsfs-adapter-static STATIC ${WSFS_ADAPTER_SOURCES})
set_target_properties(wsfs-adapter-static PROPERTIES OUTPUT_NAME wsfs-adapter) set_target_properties(wsfs-adapter-static PROPERTIES OUTPUT_NAME wsfs-adapter)
@ -210,6 +211,6 @@ target_include_directories(alltests PUBLIC lib ${EXTRA_INCLUDE_DIRS} ${GTEST_INC
target_compile_options(alltests PUBLIC ${EXTRA_CFLAGS} ${GTEST_CFLAGS}) target_compile_options(alltests PUBLIC ${EXTRA_CFLAGS} ${GTEST_CFLAGS})
enable_testing() enable_testing()
add_test(alltests alltests) gtest_discover_tests(alltests TEST_PREFIX alltests:)
endif(NOT WITHOUT_TESTS) endif(NOT WITHOUT_TESTS)