From b1f379d68099ea96af3181fea32dd45160c67c53 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 14 Sep 2023 17:52:01 -0500 Subject: [PATCH] Add explicit dependency on plugin library (#124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Carroll Co-authored-by: Alejandro Hernández Cordero --- 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>