dmlc / dmlc/dgl

Migrating CMake build from `FindCUDA` to `FindCUDAToolkit`

Open
#7,113 3 comments 1 reaction 1 assignee Claimed by @Rhett-Ying View on GitHub
Work Item
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

When building [on CI]( https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=874072&view=logs&j=9a864fd9-6c8f-52ca-79ce-2aa6dca1a1de&t=c1052e73-18ac-51e7-1f22-d9a958a44bcd ) (also [attached log]( https://github.com/dmlc/dgl/files/14218000/dgl-feedstock_20240208.19_linux_64_c_compiler_version11cuda_compilernvcccuda_compiler_version11.8cxx_compiler_version11python3.10.____cpython.txt ) for posterity), am seeing the following warning:

```
-- Build with CUDA support
CMake Warning (dev) at cmake/util/FindCUDA.cmake:25 (include):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

Call Stack (most recent call first):
cmake/modules/CUDA.cmake:3 (find_cuda)
CMakeLists.txt:153 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
```

This is because CMake's [`FindCUDA`]( https://cmake.org/cmake/help/latest/module/FindCUDA.html ) is [deprecated]( https://cmake.org/cmake/help/latest/policy/CMP0146.html ). The path CMake now recommends is to use [`FindCUDAToolkit`]( https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html )

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.