Skip to content

VS: Restore support for CUDA with no optimization flags

Brad King requested to merge brad.king/cmake:vs-cuda into master

Since !9270 (merged) we generate an empty Optimization element for the host compiler when there are no C or C++ optimization flags enabled. The CUDA Toolkit Visual Studio integration fails with an error if an empty string is inherited from the host compiler's Optimization element. If no CUDA optimization flags are specified, write an explicit empty Optimization element for the CUDA compiler too.

Fixes: #26144 (closed)
Backport: release

Merge request reports

Loading