mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
adds dynamic test discover support
This commit is contained in:
parent
60fe3fc171
commit
506860b31a
@ -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)
|
||||||
@ -180,6 +180,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)
|
||||||
@ -207,6 +208,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)
|
Loading…
Reference in New Issue
Block a user