From 4e0385b85d310b66266b0abf8deff2f7bfd77e69 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 8 Jul 2024 12:29:48 -0400 Subject: [PATCH] Set CUDA_RUNTIME_LIBRARY to documented case style (#641) Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Robert Maynard (https://github.com/robertmaynard) URL: https://github.com/rapidsai/rapids-cmake/pull/641 --- rapids-cmake/cuda/set_runtime.cmake | 6 +++--- testing/cuda/set_runtime-shared.cmake | 6 +++--- testing/cuda/set_runtime-static.cmake | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rapids-cmake/cuda/set_runtime.cmake b/rapids-cmake/cuda/set_runtime.cmake index 1b110f2a..22d2be2b 100644 --- a/rapids-cmake/cuda/set_runtime.cmake +++ b/rapids-cmake/cuda/set_runtime.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,10 +62,10 @@ function(rapids_cuda_set_runtime target use_static value) endif() if(${value}) - set_target_properties(${target} PROPERTIES CUDA_RUNTIME_LIBRARY STATIC) + set_target_properties(${target} PROPERTIES CUDA_RUNTIME_LIBRARY Static) target_link_libraries(${target} ${mode} $) else() - set_target_properties(${target} PROPERTIES CUDA_RUNTIME_LIBRARY SHARED) + set_target_properties(${target} PROPERTIES CUDA_RUNTIME_LIBRARY Shared) target_link_libraries(${target} ${mode} $) endif() diff --git a/testing/cuda/set_runtime-shared.cmake b/testing/cuda/set_runtime-shared.cmake index f1e77dea..2711a638 100644 --- a/testing/cuda/set_runtime-shared.cmake +++ b/testing/cuda/set_runtime-shared.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,11 +21,11 @@ rapids_cuda_set_runtime(uses_cuda USE_STATIC FALSE) get_target_property(runtime_state uses_cuda CUDA_RUNTIME_LIBRARY) -if( NOT runtime_state STREQUAL "SHARED") +if( NOT runtime_state STREQUAL "Shared") message(FATAL_ERROR "rapids_cuda_set_runtime didn't correctly set CUDA_RUNTIME_LIBRARY") endif() get_target_property(linked_libs uses_cuda LINK_LIBRARIES) if(NOT "$" IN_LIST linked_libs) - message(FATAL_ERROR "rapids_cuda_set_runtime didn't privately link to CUDA::cudart_static") + message(FATAL_ERROR "rapids_cuda_set_runtime didn't privately link to CUDA::cudart") endif() diff --git a/testing/cuda/set_runtime-static.cmake b/testing/cuda/set_runtime-static.cmake index c7a1c502..42beb00c 100644 --- a/testing/cuda/set_runtime-static.cmake +++ b/testing/cuda/set_runtime-static.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ add_library(uses_cuda SHARED ${CMAKE_CURRENT_BINARY_DIR}/empty.cpp) rapids_cuda_set_runtime(uses_cuda USE_STATIC TRUE) get_target_property(runtime_state uses_cuda CUDA_RUNTIME_LIBRARY) -if( NOT runtime_state STREQUAL "STATIC") +if( NOT runtime_state STREQUAL "Static") message(FATAL_ERROR "rapids_cuda_set_runtime didn't correctly set CUDA_RUNTIME_LIBRARY") endif()