33 lines
883 B
CMake
33 lines
883 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/AttributeDefinitionGeneratorTest.cpp
|
|
object/PrimaryKeyResolverTest.cpp
|
|
object/SchemaTest.cpp
|
|
)
|
|
|
|
target_link_libraries(CoreTests matador-core Catch2::Catch2WithMain)
|
|
|
|
target_include_directories(CoreTests
|
|
PUBLIC
|
|
${CMAKE_SOURCE_DIR}/test/models}
|
|
)
|
|
|
|
#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)
|