From 66bad934871d6fe9bde3ff533f4210d5d8dcdf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Mon, 23 Jun 2025 18:37:56 -0400 Subject: [PATCH] cmake/tests: add restinio dependency for ut_namedirectory Namedirectory unit tests uses restinio directly which itself depends on llhttp. So while restinio itself is header only, we need to declare the dependency for appropriate linking of llhttp. Change-Id: I113257613c660e5e73c52c14fb6691cd6c85f693 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 055fdd8e0..d6a75f4d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -778,6 +778,7 @@ else() if (BUILD_TESTING) pkg_search_module(Cppunit REQUIRED IMPORTED_TARGET cppunit) + find_package(Restinio REQUIRED) # for namedirectory tests file(COPY test/unitTest/actors DESTINATION ${CMAKE_BINARY_DIR}) file(COPY test/unitTest/conversation/rsc DESTINATION ${CMAKE_BINARY_DIR}/conversation) @@ -896,7 +897,7 @@ else() endif() add_executable(ut_namedirectory test/unitTest/namedirectory/namedirectory.cpp) - target_link_libraries(ut_namedirectory ut_library) + target_link_libraries(ut_namedirectory ut_library restinio::restinio) add_test(NAME namedirectory COMMAND ut_namedirectory) add_executable(ut_scheduler test/unitTest/scheduler.cpp)