From 1ccd374807405e2989f8fc3fa6cacba4e868c397 Mon Sep 17 00:00:00 2001
From: Bram Veenboer <bram.veenboer@gmail.com>
Date: Tue, 27 Feb 2024 12:05:23 +0100
Subject: [PATCH] Only link pmt with BUILD_WITH_PMT enabled

---
 test/Common/CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/Common/CMakeLists.txt b/test/Common/CMakeLists.txt
index 75f3443..7e8a146 100644
--- a/test/Common/CMakeLists.txt
+++ b/test/Common/CMakeLists.txt
@@ -2,5 +2,8 @@ foreach(component Record UnitTest)
   add_library(${component} OBJECT)
   target_sources(${component} PRIVATE ${component}.cc)
   target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR})
-  target_link_libraries(${component} PUBLIC cudawrappers::cu pmt)
+  target_link_libraries(${component} PUBLIC cudawrappers::cu)
+  if(BUILD_WITH_PMT)
+    target_link_libraries(${component} PRIVATE pmt)
+  endif()
 endforeach()
-- 
GitLab