2022-11-07 08:12:35 +00:00
|
|
|
set(DCOMMONTEST_SOURCES
|
|
|
|
"AMFDeserializeTests.cpp"
|
2023-05-13 22:22:00 +00:00
|
|
|
"Amf3Tests.cpp"
|
2023-12-24 00:11:00 +00:00
|
|
|
"CastUnderlyingTypeTests.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.
|
|
|
|
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_RUNTIME_OUTPUT_DIRECTORY})
|
|
|
|
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)
|