# Testing library if ( (NOT ${GUIX}) ) include(FetchContent) FetchContent_Declare( catch GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v3.5.2) FetchContent_MakeAvailable(catch) include(Catch) endif() #Adds Catch2::Catch2 include(CTest) include(cmake/folders.cmake) #FIXME Later use tests dir to do testing: guix refuses to build tests #if(BUILD_TESTING) # add_subdirectory(tests) #endif() 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 if( ${GUIX} ) include(tests/Catch.cmake) target_link_libraries(tests PRIVATE cpr marisa rdricpp Catch2Main Catch2) else() target_link_libraries(tests PRIVATE cpr::cpr nlohmann_json::nlohmann_json marisa rdricpp Catch2::Catch2WithMain) endif() 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)