https://github.com/Kitware/CMake
Revision dd77dec18d66a2e20480d9bf2ab06231765720a4 authored by Raul Tambre on 25 October 2020, 08:23:10 UTC, committed by Brad King on 27 October 2020, 11:29:01 UTC
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
1 parent e9109de
History
Tip revision: dd77dec18d66a2e20480d9bf2ab06231765720a4 authored by Raul Tambre on 25 October 2020, 08:23:10 UTC
VS: Don't compute CUDA options unless necessary
Tip revision: dd77dec
File Mode Size
.github
.gitlab
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 1.3 KB
.clang-tidy -rw-r--r-- 1.1 KB
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 132 bytes
.gitlab-ci.yml -rw-r--r-- 4.4 KB
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.7 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 11.9 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 33.4 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.0 KB
CTestConfig.cmake -rw-r--r-- 513 bytes
CTestCustom.cmake.in -rw-r--r-- 7.1 KB
CompileFlags.cmake -rw-r--r-- 4.2 KB
Copyright.txt -rw-r--r-- 5.2 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.9 KB
bootstrap -rwxr-xr-x 53.8 KB
cmake_uninstall.cmake.in -rw-r--r-- 789 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top