summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0104
Commit message (Collapse)AuthorAgeFilesLines
* Add deprecation warnings for policies CMP0108 and belowBrad King2022-10-121-0/+10
| | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.18 and below to encourage projects to port away from setting policies to OLD.
* CUDA: Fix tests with CUDAARCHS setRaul Tambre2020-11-301-0/+2
| | | | | | | With CUDAARCHS there's the possibility of tests being run with multiple architectures or having CMAKE_CUDA_ARCHITECTURES set with NVCC despite CMP0104 being OLD. Fix a few tests to work properly in such cases.
* VS: Don't compute CUDA options unless necessaryRaul Tambre2020-10-272-0/+7
| | | | | | | | | | | | | | | | | | In the following scenario (with 3.18 policies): 1. A CXX target is created. 2. CUDA language is enabled. CMake 3.18 introduced CMP0104, which requires CUDA_ARCHITECTURES to be set. Because the CXX target was created before CUDA was enabled it wouldn't have it set. The Visual Studio generator would however end up computing CUDA compile options for the CXX target, which would result in a fatal error due to the policy violation. There doesn't seem to be a reason to do this for targets that don't actually use the CUDA language, so we can skip and generate the CXX target just fine. Fixes: #21341
* CUDA: Add support for disabling CUDA_ARCHITECTURESRaul Tambre2020-06-152-0/+4
| | | | | | | | | | The ability to disable adding architectures completely for packaging purposes and cases requiring passing the architectures flags explicitly has been requested. Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES for this purpose. Implements #20821.
* Tests: Update CUDA tests to work with ClangRaul Tambre2020-05-151-0/+1
|
* CUDA: Add CUDA_ARCHITECTURES target propertyRaul Tambre2020-04-158-0/+40
Simplifies CUDA target architecture handling. Required for Clang support as Clang doesn't automatically select a supported architecture. We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it. Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC. Implements #17963.