Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need later version & better way to locate cuFile lib #17

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.23 FATAL_ERROR)
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)

# Setup cmake policies.
foreach(policy
Expand Down Expand Up @@ -31,21 +31,23 @@ project(HDF5_VFD_GDS C)
#------------------------------------------------------------------------------
# Setup install and output Directories
#------------------------------------------------------------------------------
include(GNUInstallDirs)

if(NOT HDF5_VFD_GDS_INSTALL_BIN_DIR)
qkoziol marked this conversation as resolved.
Show resolved Hide resolved
set(HDF5_VFD_GDS_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
set(HDF5_VFD_GDS_INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR})
endif()
if(NOT HDF5_VFD_GDS_INSTALL_LIB_DIR)
set(HDF5_VFD_GDS_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
set(HDF5_VFD_GDS_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT HDF5_VFD_GDS_INSTALL_INCLUDE_DIR)
# Interface include will default to prefix/include
set(HDF5_VFD_GDS_INSTALL_INTERFACE include)
set(HDF5_VFD_GDS_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
set(HDF5_VFD_GDS_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
else()
set(HDF5_VFD_GDS_INSTALL_INTERFACE ${HDF5_VFD_GDS_INSTALL_INCLUDE_DIR})
endif()
if(NOT HDF5_VFD_GDS_INSTALL_DATA_DIR)
set(HDF5_VFD_GDS_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share)
set(HDF5_VFD_GDS_INSTALL_DATA_DIR ${CMAKE_INSTALL_DATAROOTDIR})
endif()

# Setting this ensures that "make install" will leave rpaths to external
Expand All @@ -69,18 +71,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${HDF5_VFD_GDS_CMAKE_MODULE_PATH})
#------------------------------------------------------------------------------
find_package (CUDA REQUIRED)

# Set Cufile installation directory to Cuda installation directory by default
set (HDF5_VFD_GDS_CUFILE_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Cufile installation directory for Nvidia GDS support")

# Try to locate cufile library
find_library (HDF5_VFD_GDS_CUFILE_LIB
NAMES
cufile
HINTS
"${HDF5_VFD_GDS_CUFILE_DIR}/lib"
"${HDF5_VFD_GDS_CUFILE_DIR}/lib64"
REQUIRED
)
find_package(CUDAToolKit REQUIRED)

set(HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES
${HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES}
Expand Down Expand Up @@ -158,7 +150,7 @@ message(STATUS "Configuring ${HDF5_VFD_GDS_PACKAGE} v${HDF5_VFD_GDS_VERSION_FULL
#------------------------------------------------------------------------------
if(APPLE AND NOT HDF5_VFD_GDS_EXTERNALLY_CONFIGURED)
# We are doing a unix-style install i.e. everything will be installed in
# CMAKE_INSTALL_PREFIX/bin and CMAKE_INSTALL_PREFIX/lib etc. as on other unix
# ${CMAKE_INSTALL_BINDIR} and ${CMAKE_INSTALL_LIBDIR} etc. as on other unix
# platforms. We still need to setup CMAKE_INSTALL_NAME_DIR correctly so that
# the binaries point to appropriate location for the libraries.

Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ target_include_directories(hdf5_vfd_gds
SYSTEM PUBLIC ${HDF5_VFD_GDS_EXT_INCLUDE_DEPENDENCIES}
)
target_link_libraries(hdf5_vfd_gds
PUBLIC
${HDF5_VFD_GDS_EXPORTED_LIBS}
qkoziol marked this conversation as resolved.
Show resolved Hide resolved
${HDF5_VFD_GDS_EXT_LIB_DEPENDENCIES}
${HDF5_VFD_GDS_EXT_PKG_DEPENDENCIES}
PRIVATE CUDA::cuFile
)
hdf5_vfd_gds_set_lib_options(hdf5_vfd_gds "hdf5_vfd_gds" ${HDF5_VFD_GDS_LIBTYPE})
if(HDF5_VFD_GDS_ENABLE_COVERAGE)
Expand Down