summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-01-11 16:27:15 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2023-01-11 16:27:37 (GMT)
commite60fa80fbe3f2fca1c915eedee7648b770762116 (patch)
tree0c8c4e4c31a1ef074d40d62402baa71704ffe1f9 /Modules
parent51a0292d9cb24e13f6b600bc97d950ad4344cfa5 (diff)
downloadCMake-e60fa80fbe3f2fca1c915eedee7648b770762116.zip
CMake-e60fa80fbe3f2fca1c915eedee7648b770762116.tar.gz
CMake-e60fa80fbe3f2fca1c915eedee7648b770762116.tar.bz2
FindCUDAToolkit: Handle CUDA::nvToolsExt not existing
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindCUDAToolkit.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index f104bfc..ea30bea 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -1129,7 +1129,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 <nvtx3/nvToolsExt.h> instead.")
endif()