26 lines
713 B
CMake
26 lines
713 B
CMake
CPMAddPackage("gh:catchorg/Catch2@3.7.1")
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
|
|
|
add_executable(CoreTests
|
|
utils/BasicTypeToVisitorTest.cpp
|
|
utils/ConvertTest.cpp
|
|
utils/DefaultTypeTraitsTest.cpp
|
|
utils/DependencyInjectionTest.cpp
|
|
utils/IdentifierTest.cpp
|
|
utils/ResultTest.cpp
|
|
utils/FieldAttributeTest.cpp
|
|
utils/VersionTest.cpp
|
|
utils/StringTest.cpp
|
|
object/PrototypeTreeTest.cpp
|
|
)
|
|
|
|
target_link_libraries(CoreTests matador-core Catch2::Catch2WithMain)
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
target_compile_options(CoreTests PRIVATE -coverage)
|
|
target_link_options(CoreTests PRIVATE -coverage)
|
|
endif ()
|
|
|
|
add_test(NAME CoreTests COMMAND CoreTests)
|