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
|
|
|
add_dependencies(dCommonTests conncpp_tests)
|
|
|
|
|
|
|
|
# Apple needs some special linkage for the mariadb connector for tests.
|
2024-04-06 22:43:47 +00:00
|
|
|
#if(APPLE)
|
|
|
|
#add_custom_command(TARGET dCommonTests POST_BUILD
|
|
|
|
# COMMAND otool ARGS -l dCommonTests
|
|
|
|
# COMMAND otool ARGS -L dCommonTests
|
|
|
|
# COMMAND ls
|
|
|
|
# COMMAND otool ARGS -D libmariadbcpp.dylib
|
|
|
|
# COMMAND install_name_tool ARGS -change libmariadbcpp.dylib @rpath/libmariadbcpp.dylib dCommonTests
|
|
|
|
# COMMAND otool ARGS -L dCommonTests
|
|
|
|
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
#endif()
|
|
|
|
|
|
|
|
#set_target_properties(libmariadbcpp PROPERTIES IMPORTED_LOCATION @rpath/libmariadbcpp.dylib)
|
2022-11-07 08:12:35 +00:00
|
|
|
|
|
|
|
# Link needed libraries
|
2024-04-06 22:43:47 +00:00
|
|
|
target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main MariaDB::ConnCpp)
|
2022-11-07 08:12:35 +00:00
|
|
|
|
|
|
|
# Copy test files to testing directory
|
|
|
|
add_subdirectory(TestBitStreams)
|
|
|
|
file(COPY ${TESTBITSTREAMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
# Discover the tests
|
|
|
|
gtest_discover_tests(dCommonTests)
|