feat: first working set
This commit is contained in:
parent
cccebf674a
commit
bed7360063
5 changed files with 59 additions and 42 deletions
|
@ -18,8 +18,8 @@ include(../cmake/tools.cmake)
|
|||
|
||||
include(../cmake/get_cpm.cmake)
|
||||
|
||||
# CPMAddPackage("gh:doctest/doctest@2.4.9")
|
||||
CPMAddPackage("gh:TheLartians/Format.cmake@1.7.3")
|
||||
CPMAddPackage(NAME Catch2 GITHUB_REPOSITORY catchorg/Catch2 VERSION 3.8.1)
|
||||
CPMAddPackage("gh:TheLartians/Format.cmake@1.8.3")
|
||||
|
||||
if(TEST_INSTALLED_VERSION)
|
||||
find_package(Glimpses REQUIRED)
|
||||
|
@ -31,11 +31,7 @@ endif()
|
|||
|
||||
file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
|
||||
add_executable(${PROJECT_NAME} ${sources})
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
# doctest::doctest
|
||||
Glimpses::Glimpses
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain Glimpses::Glimpses)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
|
||||
|
||||
# enable compiler warnings
|
||||
|
@ -52,6 +48,9 @@ endif()
|
|||
|
||||
enable_testing()
|
||||
|
||||
include(CTest)
|
||||
add_test(GlimpsesTests GlimpsesTests)
|
||||
|
||||
# Note: doctest and similar testing frameworks can automatically configure CMake tests. For other testing frameworks add the tests target
|
||||
# instead: add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue