gd-tools/cmake/dev-mode.cmake

54 lines
1.4 KiB
CMake
Raw Normal View History

2024-02-04 18:24:04 +00:00
# Testing library
2024-02-07 20:32:30 +00:00
#FetchContent_Declare(
# catch
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
# GIT_TAG v3.5.2)
#FetchContent_MakeAvailable(catch)
2024-02-04 18:24:04 +00:00
# Adds Catch2::Catch2
2024-02-07 20:32:30 +00:00
#find_package(Catch2 REQUIRED)
2024-02-04 18:24:04 +00:00
include(cmake/folders.cmake)
2024-02-07 20:32:30 +00:00
#add_subdirectory(Catch2-3.5.2)
2024-02-04 18:24:04 +00:00
include(CTest)
2024-02-07 20:32:30 +00:00
include(tests/Catch.cmake)
#include(cmake/catch.cmake)
#include(${CATCH_MODULE_PATH}/Catch.cmake)
#if(BUILD_TESTING)
# add_subdirectory(tests)
#endif()
2024-02-04 18:24:04 +00:00
2024-02-07 20:32:30 +00:00
#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 )
2024-02-04 18:24:04 +00:00
target_compile_features(tests PRIVATE cxx_std_23)
# Should be linked to the rdricpp library, as well as the Catch2 testing library
2024-02-07 20:32:30 +00:00
#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)
2024-02-04 18:24:04 +00:00
catch_discover_tests(tests)
2024-02-07 20:32:30 +00:00
add_test(NAME test COMMAND tests)
2024-02-04 18:24:04 +00:00
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)