From ebd66346777f3a489580b6882b15d4371aaaf859 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 9 Jun 2023 11:18:04 -0500 Subject: [PATCH] Use rapids_init_cuda_runtime. --- cpp/CMakeLists.txt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index c50ccbc4775..121ebe5b539 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -141,6 +141,10 @@ rapids_cmake_support_conda_env(conda_env MODIFY_PREFIX_PATH) # ################################################################################################## # * compiler options ------------------------------------------------------------------------------ + +# CUDA runtime +rapids_cuda_init_runtime(USE_STATIC ${CUDA_STATIC_RUNTIME}) + rapids_find_package( CUDAToolkit REQUIRED BUILD_EXPORT_SET cudf-exports @@ -710,18 +714,6 @@ if(TARGET conda_env) target_link_libraries(cudf PRIVATE conda_env) endif() -if(CUDA_STATIC_RUNTIME) - # Tell CMake what CUDA language runtime to use - set_target_properties(cudf PROPERTIES CUDA_RUNTIME_LIBRARY Static) - # Make sure to export to consumers what runtime we used - target_link_libraries(cudf PUBLIC CUDA::cudart_static) -else() - # Tell CMake what CUDA language runtime to use - set_target_properties(cudf PROPERTIES CUDA_RUNTIME_LIBRARY Shared) - # Make sure to export to consumers what runtime we used - target_link_libraries(cudf PUBLIC CUDA::cudart) -endif() - file( WRITE "${CUDF_BINARY_DIR}/fatbin.ld" [=[