2022-11-07 08:12:35 +00:00
|
|
|
set(DCOMMONTEST_SOURCES
|
|
|
|
"AMFDeserializeTests.cpp"
|
2023-05-13 22:22:00 +00:00
|
|
|
"Amf3Tests.cpp"
|
2024-03-07 05:45:04 +00:00
|
|
|
"ToUnderlyingTests.cpp"
|
2023-05-08 11:31:10 +00:00
|
|
|
"HeaderSkipTest.cpp"
|
2023-11-18 09:33:23 +00:00
|
|
|
"TestCDFeatureGatingTable.cpp"
|
2022-11-07 08:12:35 +00:00
|
|
|
"TestLDFFormat.cpp"
|
|
|
|
"TestNiPoint3.cpp"
|
|
|
|
"TestEncoding.cpp"
|
2023-09-21 01:06:28 +00:00
|
|
|
"TestLUString.cpp"
|
|
|
|
"TestLUWString.cpp"
|
2023-05-02 22:19:20 +00:00
|
|
|
"dCommonDependencies.cpp"
|
2022-11-07 08:12:35 +00:00
|
|
|
)
|
|
|
|
|
2023-12-23 16:51:59 +00:00
|
|
|
add_subdirectory(dEnumsTests)
|
|
|
|
list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS})
|
|
|
|
|
2022-11-07 08:12:35 +00:00
|
|
|
# Set our executable
|
|
|
|
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
2024-03-06 02:13:24 +00:00
|
|
|
|
2024-12-08 06:36:49 +00:00
|
|
|
# Needs to be in binary dir for ctest
|
2024-03-06 02:13:24 +00:00
|
|
|
if(APPLE)
|
2024-12-08 06:36:49 +00:00
|
|
|
add_custom_target(dCommonTestsLink
|
|
|
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
add_dependencies(dCommonTests dCommonTestsLink)
|
2024-03-06 02:13:24 +00:00
|
|
|
endif()
|
2022-11-07 08:12:35 +00:00
|
|
|
|
|
|
|
# Link needed libraries
|
|
|
|
target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main)
|
|
|
|
|
|
|
|
# Copy test files to testing directory
|
|
|
|
add_subdirectory(TestBitStreams)
|
|
|
|
file(COPY ${TESTBITSTREAMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
# Discover the tests
|
|
|
|
gtest_discover_tests(dCommonTests)
|