2022-11-07 00:12:35 -08:00
|
|
|
set(DCOMMONTEST_SOURCES
|
|
|
|
"AMFDeserializeTests.cpp"
|
2023-05-13 15:22:00 -07:00
|
|
|
"Amf3Tests.cpp"
|
2024-03-06 23:45:04 -06:00
|
|
|
"ToUnderlyingTests.cpp"
|
2023-05-08 04:31:10 -07:00
|
|
|
"HeaderSkipTest.cpp"
|
2023-11-18 03:33:23 -06:00
|
|
|
"TestCDFeatureGatingTable.cpp"
|
2022-11-07 00:12:35 -08:00
|
|
|
"TestLDFFormat.cpp"
|
|
|
|
"TestNiPoint3.cpp"
|
|
|
|
"TestEncoding.cpp"
|
2023-09-20 20:06:28 -05:00
|
|
|
"TestLUString.cpp"
|
|
|
|
"TestLUWString.cpp"
|
2023-05-02 15:19:20 -07:00
|
|
|
"dCommonDependencies.cpp"
|
2022-11-07 00:12:35 -08:00
|
|
|
)
|
|
|
|
|
2023-12-23 10:51:59 -06:00
|
|
|
add_subdirectory(dEnumsTests)
|
|
|
|
list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS})
|
|
|
|
|
2022-11-07 00:12:35 -08:00
|
|
|
# Set our executable
|
|
|
|
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
2024-03-06 03:13:24 +01:00
|
|
|
|
2024-12-07 22:36:49 -08:00
|
|
|
# Needs to be in binary dir for ctest
|
2024-03-06 03:13:24 +01:00
|
|
|
if(APPLE)
|
2024-12-07 22:36:49 -08:00
|
|
|
add_custom_target(dCommonTestsLink
|
|
|
|
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
add_dependencies(dCommonTests dCommonTestsLink)
|
2024-03-06 03:13:24 +01:00
|
|
|
endif()
|
2022-11-07 00:12:35 -08: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)
|