From ae108430a582e4cc44ea8fe2797885ad3edcf64a Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 6 Nov 2024 12:48:19 -0500 Subject: [PATCH 1/4] Fix exporting of include directories The CUDA and cufile include directories should not be exported as absolute paths when installing, only in the build tree. Add a $ generator expression. --- cpp/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3a42e44401..040efb2009 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -125,8 +125,8 @@ add_library(kvikio::kvikio ALIAS kvikio) target_include_directories( kvikio - PUBLIC "$" "${CUDAToolkit_INCLUDE_DIRS}" - "${cuFile_INCLUDE_DIRS}" + PUBLIC "$" "$" + "$" INTERFACE "$" ) From b48a2879a3da50a73b8a8e4309fa1a9755e9b267 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 6 Nov 2024 12:58:54 -0500 Subject: [PATCH 2/4] Style --- cpp/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 040efb2009..9621950f29 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -125,7 +125,8 @@ add_library(kvikio::kvikio ALIAS kvikio) target_include_directories( kvikio - PUBLIC "$" "$" + PUBLIC "$" + "$" "$" INTERFACE "$" ) From bcfaae0fa5fa797a3a822f3eadde2b85d33d4f85 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 6 Nov 2024 13:48:29 -0500 Subject: [PATCH 3/4] Link against targets instead of using directories --- cpp/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9621950f29..9d7fa96a6a 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -126,8 +126,6 @@ add_library(kvikio::kvikio ALIAS kvikio) target_include_directories( kvikio PUBLIC "$" - "$" - "$" INTERFACE "$" ) @@ -135,6 +133,7 @@ target_include_directories( target_link_libraries( kvikio PUBLIC Threads::Threads BS::thread_pool ${CMAKE_DL_LIBS} $ + $> $> PRIVATE $ ) From e78741e8f034b384d5b4a3289fb45f1175d74f4b Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 6 Nov 2024 13:50:15 -0500 Subject: [PATCH 4/4] Style --- cpp/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9d7fa96a6a..8e3302f991 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -132,8 +132,12 @@ target_include_directories( # Notice, we do not link to cuda or cufile since KvikIO opens them manually using `dlopen()`. target_link_libraries( kvikio - PUBLIC Threads::Threads BS::thread_pool ${CMAKE_DL_LIBS} $ - $> $> + PUBLIC Threads::Threads + BS::thread_pool + ${CMAKE_DL_LIBS} + $ + $> + $> PRIVATE $ )