From eb4de100752a834e38ba0b83e586d70af7eafb3e Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 11 Jan 2023 11:27:15 -0500 Subject: FindCUDAToolkit: Handle CUDA::nvToolsExt not existing Fixes #24275 --- Modules/FindCUDAToolkit.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index f06f0e8..8adb3bf 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -1084,7 +1084,7 @@ if(CUDAToolkit_FOUND) if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 10.0) # nvToolsExt is deprecated since nvtx3 introduction. # Warn only if the project requires a sufficiently new CMake to make migration possible. - if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER_EQUAL 3.25) + if(TARGET CUDA::nvToolsExt AND CMAKE_MINIMUM_REQUIRED_VERSION VERSION_GREATER_EQUAL 3.25) set_property(TARGET CUDA::nvToolsExt PROPERTY DEPRECATION "nvToolsExt has been superseded by nvtx3 since CUDA 10.0 and CMake 3.25. Use CUDA::nvtx3 and include instead.") endif() -- cgit v0.12