xo-umbrella2/xo-ordinaltree/utest/CMakeLists.txt

33 lines
1.3 KiB
CMake

# ordinaltree/utest/CMakeLists.txt
# note: tests in this directory use Catch2-provided main
set(SELF_EXE utest.tree)
set(SELF_SOURCE_FILES tree_utest_main.cpp redblacktree.cpp bplustree.cpp RedBlackTree-gc.test.cpp)
if (ENABLE_TESTING)
# xo_add_utest_executable: add_executable + xo_include_options2 + add_test,
# and registers ${SELF_EXE} with all_utest_executables_${PROJECT_NAME}
# (and the global utest list)
xo_add_utest_executable(${SELF_EXE} ${SELF_SOURCE_FILES})
# need coverage on unit test b/c header-only libraries
#target_code_coverage(${SELF_EXE} EXCLUDE */nix/store* utest/*)
#target_code_coverage(${SELF_EXE} AUTO ALL)
# ----------------------------------------------------------------
# internal dependencies: refcnt, ...
xo_self_dependency(${SELF_EXE} xo_ordinaltree)
xo_dependency(${SELF_EXE} xo_object)
xo_dependency(${SELF_EXE} xo_alloc)
xo_dependency(${SELF_EXE} refcnt)
# NB no xo-indentlog: the utests use xo::pp::{scope,xtag,tostr} now,
# and get xo_ppsink transitively from xo_ordinaltree.
xo_dependency(${SELF_EXE} randomgen)
# ----------------------------------------------------------------
# 3rd part dependency: catch2:
xo_external_target_dependency(${SELF_EXE} Catch2 Catch2::Catch2)
endif()
# end ordinaltree/utest/CMakeLists.txt