Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CUDA dependency management after CMP0146 #1824

Open
ldrumm opened this issue Jul 4, 2024 · 0 comments
Open

Update CUDA dependency management after CMP0146 #1824

ldrumm opened this issue Jul 4, 2024 · 0 comments
Assignees
Labels
build build system and configuration cuda CUDA adapter specific issues

Comments

@ldrumm
Copy link
Contributor

ldrumm commented Jul 4, 2024

$ cmake --help-policy CMP0146
CMP0146
-------

.. versionadded:: 3.27

The ``FindCUDA`` module is removed.

The ``FindCUDA`` module has been deprecated since CMake 3.10.
CMake 3.27 and above prefer to not provide the module.
This policy provides compatibility for projects that have not been
ported away from it.

Projects using the ``FindCUDA`` module should be updated to use
CMake's first-class ``CUDA`` language support.  List ``CUDA`` among the
languages named in the top-level call to the ``project()`` command,
or call the ``enable_language()`` command with ``CUDA``.
Then one can add CUDA (``.cu``) sources directly to targets,
similar to other languages.

The ``OLD`` behavior of this policy is for ``find_package(CUDA)`` to
load the deprecated module.  The ``NEW`` behavior is for uses of the
module to fail as if it does not exist.

This policy was introduced in CMake version 3.27.
It may be set by ``cmake_policy()`` or ``cmake_minimum_required()``.
If it is not set, CMake warns, and uses ``OLD`` behavior.

.. note::
  The ``OLD`` behavior of a policy is
  ``deprecated by definition``
  and may be removed in a future version of CMake.

We should work out whether we should simply set the policy to OLD, or upgrade the CUDA adaptor to use the new cmake functionality

@ldrumm ldrumm added cuda CUDA adapter specific issues build build system and configuration labels Jul 4, 2024
@ldrumm ldrumm self-assigned this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build system and configuration cuda CUDA adapter specific issues
Projects
None yet
Development

No branches or pull requests

1 participant