Update to have debug and release builds

This commit is contained in:
David Markowitz
2024-10-27 11:11:56 -07:00
parent e0b54645dc
commit 0509aaf855
4 changed files with 251 additions and 171 deletions

View File

@@ -15,8 +15,10 @@ endif()
add_custom_target(conncpp_tests
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
add_custom_target(zlib_tests
${CMAKE_COMMAND} -E copy $<TARGET_FILE:zlib> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
if(MSVC)
add_custom_target(zlib_tests
${CMAKE_COMMAND} -E copy $<TARGET_FILE:ZLIB::ZLIB> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# Add the subdirectories
add_subdirectory(dCommonTests)

View File

@@ -17,8 +17,10 @@ list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS})
# Set our executable
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
add_dependencies(dCommonTests conncpp_tests zlib_tests)
add_dependencies(dCommonTests conncpp_tests)
if(MSVC)
add_dependencies(dCommonTests zlib_tests)
endif()
# Apple needs some special linkage for the mariadb connector for tests.
if(APPLE)
add_custom_command(TARGET dCommonTests POST_BUILD