Missing library dependencies
When building on rocky 8, I found some required libraries weren't listed for linking some of the test and example applications. The following patch adds the missing libraries:
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index c409e35..563a86e 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,10 +1,10 @@
add_executable(publisher publisher.cc)
-target_link_libraries(publisher PUBLIC pub_sub_asan)
+target_link_libraries(publisher PUBLIC pub_sub_asan asan)
add_executable(subscriber subscriber.cc)
-target_link_libraries(subscriber PUBLIC pub_sub_asan)
+target_link_libraries(subscriber PUBLIC pub_sub_asan asan)
# the main examples are built with sanitizer support
# do a build to make sure it can build w/o sanitizers
add_executable(publisher_nosan publisher.cc)
-target_link_libraries(publisher_nosan PUBLIC pub_sub)
\ No newline at end of file
+target_link_libraries(publisher_nosan PUBLIC pub_sub)
diff --git a/pub_sub/CMakeLists.txt b/pub_sub/CMakeLists.txt
index d3521f8..40b4294 100644
--- a/pub_sub/CMakeLists.txt
+++ b/pub_sub/CMakeLists.txt
@@ -169,10 +169,10 @@ add_executable(test_pub_sub_asan
target_include_directories(test_pub_sub_asan PUBLIC
private
tests)
-target_link_libraries(test_pub_sub_asan PUBLIC pub_sub_asan catch2)
+target_link_libraries(test_pub_sub_asan PUBLIC pub_sub_asan catch2 asan boost_system pthread zstd)
add_test(NAME test_pub_sub COMMAND test_pub_sub
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(NAME test_pub_sub_asan COMMAND test_pub_sub
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
\ No newline at end of file
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")