Export symbols from snappy_test_support when building shared

This replicates existing logic that was previously applied to the
`snappy` library.

fixes #202
This commit is contained in:
David Haney
2025-03-26 08:05:35 -07:00
parent b395cf7a4f
commit 4dd78f2deb

View File

@@ -298,6 +298,9 @@ if(SNAPPY_BUILD_TESTS OR SNAPPY_BUILD_BENCHMARKS)
# Test files include snappy-test.h, HAVE_CONFIG_H must be defined. # Test files include snappy-test.h, HAVE_CONFIG_H must be defined.
target_compile_definitions(snappy_test_support PUBLIC -DHAVE_CONFIG_H) target_compile_definitions(snappy_test_support PUBLIC -DHAVE_CONFIG_H)
if(BUILD_SHARED_LIBS)
set_target_properties(snappy_test_support PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif(BUILD_SHARED_LIBS)
target_link_libraries(snappy_test_support snappy) target_link_libraries(snappy_test_support snappy)