From c571ec40db499b36834be12b6a7ab1129aa00193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=BDu=C5=BEek?= Date: Mon, 5 Aug 2024 14:27:54 +0100 Subject: [PATCH] [CUDA] Don't import XPTI symbols in the plugin library The CUDA plugin builds an XPTI file directly. By default the symbol visibility in that XPTI file is presumed to import symbols, but there are no XPTI symbols being exported, since XPTI is not built as a separate library. This causes a compilation failure on Windows. The fix is to define `XPTI_STATIC_LIBRARY`, which changes the visibility of symbols - on Windows this means no longer using `dllimport` (and neither using `dllexport`). --- source/adapters/cuda/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/adapters/cuda/CMakeLists.txt b/source/adapters/cuda/CMakeLists.txt index 013bd9b4d9..ca27eaa422 100644 --- a/source/adapters/cuda/CMakeLists.txt +++ b/source/adapters/cuda/CMakeLists.txt @@ -98,6 +98,7 @@ if (UR_ENABLE_TRACING) endif() target_compile_definitions(${TARGET_NAME} PRIVATE XPTI_ENABLE_INSTRUMENTATION + XPTI_STATIC_LIBRARY ) target_include_directories(${TARGET_NAME} PUBLIC ${XPTI_INCLUDES}