From f92eae056bc91b2385d27dbe83d8f2075bd1e267 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 14 Sep 2023 20:35:37 +0000 Subject: [PATCH] Add explicit dependency on plugin library Signed-off-by: Michael Carroll --- test/integration/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index 881d2f1..e63b7c7 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -55,6 +55,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # linking generator expressions as described here: # https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_LIBRARY target_link_libraries(INTEGRATION_static_plugins -WHOLEARCHIVE:$) + # The whole-archive invocation doesn't correctly compute dependencies, + # so explicitly require the plugin before the test can build. + add_dependencies(INTEGRATION_static_plugins GzDummyStaticPlugin) else() target_link_libraries(INTEGRATION_static_plugins $<$:-Wl,--whole-archive>