diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index c7b61b92f..5ba47d799 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -60,7 +60,8 @@ option(CUDA_ENABLE_KERNELINFO "Enable kernel resource usage info" OFF) option(CUDA_ENABLE_LINEINFO "Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler)" OFF ) -option(CUDA_STATIC_RUNTIME "Statically link the CUDA toolkit runtime and libraries" OFF) +option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF) +option(CUDA_STATIC_MATH_LIBRARIES "Statically link the CUDA math libraries" OFF) option(CUVS_USE_RAFT_STATIC "Build and statically link the RAFT libraries" OFF) option(CUDA_LOG_COMPILE_TIME "Write a log of compilation times to nvcc_compile_log.csv" OFF) option(DETECT_CONDA_ENV "Enable detection of conda environment for dependencies" ON) @@ -101,7 +102,10 @@ message(VERBOSE "cuVS: Enable kernel resource usage info: ${CUDA_ENABLE_KERNELIN message(VERBOSE "cuVS: Enable lineinfo in nvcc: ${CUDA_ENABLE_LINEINFO}") message(VERBOSE "cuVS: Enable nvtx markers: ${CUVS_NVTX}") message(VERBOSE - "cuVS: Statically link the CUDA toolkit runtime and libraries: ${CUDA_STATIC_RUNTIME}" + "cuVS: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}" +) +message(VERBOSE + "cuVS: Statically link the CUDA math libraries: ${CUDA_STATIC_MATH_LIBRARIES}" ) message(VERBOSE "cuVS: Build and statically link RAFT libraries: ${CUVS_USE_RAFT_STATIC}") @@ -132,7 +136,7 @@ endif() # * compiler options ---------------------------------------------------------- set(_ctk_static_suffix "") -if(CUDA_STATIC_RUNTIME) +if(CUDA_STATIC_MATH_LIBRARIES) set(_ctk_static_suffix "_static") endif() diff --git a/docs/source/build.rst b/docs/source/build.rst index f959fc288..86f4590fc 100644 --- a/docs/source/build.rst +++ b/docs/source/build.rst @@ -218,6 +218,11 @@ cuVS has the following configurable cmake flags available: - OFF - Statically link the CUDA runtime + * - CUDA_STATIC_MATH_LIBRARIES + - ON, OFF + - OFF + - Statically link the CUDA math libraries + * - DETECT_CONDA_ENV - ON, OFF - ON diff --git a/python/cuvs/CMakeLists.txt b/python/cuvs/CMakeLists.txt index d48cc7405..4d24682cf 100644 --- a/python/cuvs/CMakeLists.txt +++ b/python/cuvs/CMakeLists.txt @@ -67,6 +67,7 @@ if(NOT cuvs_FOUND) # Statically link dependencies if building wheels set(CUDA_STATIC_RUNTIME ON) + set(CUDA_STATIC_MATH_LIBRARIES ON) set(CUVS_USE_RAFT_STATIC ON) add_subdirectory(../../cpp cuvs-cpp EXCLUDE_FROM_ALL)