summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0104/main.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Don't compute CUDA options unless necessaryRaul Tambre2020-10-271-0/+3
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