Files
CMake/Tests
Brad King c267ed205a CUDA: Defer architecture testing to the compiler testing step
Verifying the architectures during compiler identification is redundant,
and requires a lot more up-front information than we should need.
It also causes unsupported architectures to break the compiler id and
version detection, so the resulting output from CMake does not report
the compiler version, which is useful information to know why the
specified architectures are not supported.

The "detecting compiler ABI info" and "check for working compiler" steps
already pass `CMAKE_CUDA_ARCHITECTURES` into their test projects.
Therefore we can just drop the earlier architecture testing.  Bad
architectures will be reported as a not-working compiler, and the
output will include the compiler's error message.

This reverts the approach from:

* commit 19cc5bc296 (CUDA: Throw error if user-specified architectures
                     don't work, 2020-05-26, v3.18.0-rc1~79^2)
* commit 650c1029a0 (CUDA: Detect non-working user-specified architectures
                     on NVCC, 2020-05-28, v3.18.0-rc1~51^2)
* commit 01428c5560 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES
                     doesn't work during detection,
                     2020-08-29, v3.19.0-rc1~241^2).

Their goal was in part to avoid waiting until the test for working
compiler to detect unsupported architectures.  However, experience has
shown that failing earlier is more trouble than it's worth.

Fixes: #23161
Issue: #20756
2022-04-25 15:01:36 -04:00
..
2022-04-07 09:11:56 -04:00

CMake Tests Directory
*********************

This directory contains the CMake test suite.
See also the `CMake Source Code Guide`_.

.. _`CMake Source Code Guide`: ../Help/dev/source.rst

Many tests exist as immediate subdirectories, but some tests
are organized as follows.

* ``CMakeLib/``:
  Source code, used for tests, that links to the ``CMakeLib`` library
  defined over in ``Source/``.

* ``CMakeOnly/``:
  Deprecated.  Tests that run CMake to generate a project but not build it.
  Superseded by ``Tests/RunCMake/``.

* ``Find*/``:
  Tests for specific find modules that can only be run on machines with
  the corresponding packages installed.  They are enabled in
  ``CMakeLists.txt`` by undocumented options used on CI builds.

* ``Module/``:
  Tests for specific CMake modules.

* ``RunCMake/``:
  Tests that run CMake and/or other tools while precisely checking
  their return code and stdout/stderr content.  Useful for testing
  error cases and diagnostic output.