54 lines
1.4 KiB
CMake
54 lines
1.4 KiB
CMake
# Testing library
|
|
#FetchContent_Declare(
|
|
# catch
|
|
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
|
# GIT_TAG v3.5.2)
|
|
#FetchContent_MakeAvailable(catch)
|
|
# Adds Catch2::Catch2
|
|
|
|
#find_package(Catch2 REQUIRED)
|
|
|
|
include(cmake/folders.cmake)
|
|
|
|
|
|
#add_subdirectory(Catch2-3.5.2)
|
|
include(CTest)
|
|
include(tests/Catch.cmake)
|
|
#include(cmake/catch.cmake)
|
|
#include(${CATCH_MODULE_PATH}/Catch.cmake)
|
|
|
|
#if(BUILD_TESTING)
|
|
# add_subdirectory(tests)
|
|
#endif()
|
|
|
|
|
|
#set(HEADERS src/anki_search.h src/echo.h src/massif.h src/images.h src/marisa.h src/util.h src/kana_conv.h)
|
|
add_executable(tests src/tests_main_guix.cpp src/kana_conv.h src/util.h )
|
|
target_compile_features(tests PRIVATE cxx_std_23)
|
|
|
|
# Should be linked to the rdricpp library, as well as the Catch2 testing library
|
|
#target_link_libraries(tests PRIVATE cpr::cpr fmt::fmt nlohmann_json::nlohmann_json marisa rdricpp Catch2::Catch2WithMain)
|
|
target_link_libraries(tests PRIVATE cpr marisa rdricpp Catch2Main Catch2)
|
|
|
|
|
|
|
|
catch_discover_tests(tests)
|
|
add_test(NAME test COMMAND tests)
|
|
|
|
|
|
|
|
option(BUILD_MCSS_DOCS "Build documentation using Doxygen and m.css" OFF)
|
|
if(BUILD_MCSS_DOCS)
|
|
include(cmake/docs.cmake)
|
|
endif()
|
|
|
|
option(ENABLE_COVERAGE "Enable coverage support separate from CTest's" OFF)
|
|
if(ENABLE_COVERAGE)
|
|
include(cmake/coverage.cmake)
|
|
endif()
|
|
|
|
include(cmake/lint-targets.cmake)
|
|
include(cmake/spell-targets.cmake)
|
|
|
|
add_folders(Project)
|