Skip to content

Commit

Permalink
Set POSITION_INDEPENDENT_CODE on libcurl
Browse files Browse the repository at this point in the history
Also don't export the curl dependency.
  • Loading branch information
KyleFromNVIDIA committed Feb 7, 2025
1 parent b5758ec commit d9f2315
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ rapids_find_package(

if(KvikIO_REMOTE_SUPPORT)
include(cmake/thirdparty/get_libcurl.cmake)
set_target_properties(CURL::libcurl PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()

set(cuFile_FOUND 0)
Expand Down Expand Up @@ -246,6 +247,7 @@ set(final_code_string
"
set(KvikIO_CUDA_SUPPORT [=[${KvikIO_CUDA_SUPPORT}]=])
set(KvikIO_CUFILE_SUPPORT [=[${cuFile_FOUND}]=])
set(KvikIO_REMOTE_SUPPORT [=[${KvikIO_REMOTE_SUPPORT}]=])
"
)
string(
Expand Down
4 changes: 1 addition & 3 deletions cpp/cmake/thirdparty/get_libcurl.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -24,8 +24,6 @@ function(find_and_configure_libcurl)
rapids_cpm_find(
CURL 8.5.0
GLOBAL_TARGETS libcurl
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
CPM_ARGS
GIT_REPOSITORY https://github.com/curl/curl
GIT_TAG curl-8_5_0
Expand Down
4 changes: 2 additions & 2 deletions python/kvikio/kvikio/_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -17,7 +17,7 @@ set(cython_modules arr.pyx buffer.pyx defaults.pyx cufile_driver.pyx file_handle
libnvcomp.pyx libnvcomp_ll.pyx
)

if(TARGET CURL::libcurl)
if(KvikIO_REMOTE_SUPPORT)
message(STATUS "Building remote_handle.pyx (libcurl found)")
list(APPEND cython_modules remote_handle.pyx)
else()
Expand Down

0 comments on commit d9f2315

Please sign in to comment.