From 08c8e0eae7b0258e120ce074012e99cc920e0ef4 Mon Sep 17 00:00:00 2001 From: Nanook Claw Date: Mon, 15 Jun 2026 12:09:21 +0000 Subject: [PATCH] Fix check-targets runtime library deps Signed-off-by: Nanook Claw --- targettests/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/targettests/CMakeLists.txt b/targettests/CMakeLists.txt index 32d885da1fe..a65c86ee47c 100644 --- a/targettests/CMakeLists.txt +++ b/targettests/CMakeLists.txt @@ -35,6 +35,21 @@ set(CUDAQ_TEST_DEPENDS FileCheck CustomPassPlugin ) + +# Some runtime/plugin libraries used by target tests are optional and are not +# registered in CUDAQ_RUNTIME_LIBS, so only add dependencies for targets that +# are enabled in this build. +foreach(_cudaq_targettest_runtime_dep IN ITEMS + cudaq-chemistry + cudaq-platform-mqpu + cudaq-py-utils + cudaq-rest-qpu +) + if(TARGET ${_cudaq_targettest_runtime_dep}) + list(APPEND CUDAQ_TEST_DEPENDS ${_cudaq_targettest_runtime_dep}) + endif() +endforeach() + # We require split-file, which should be installed along with FileCheck, but # the CI doesn't do it. Comment this out and open a bug. # split-file