mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Merge topic 'vs-cuda' into release-3.30
a9210a0c02 VS: Restore support for CUDA with no optimization flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9666
This commit is contained in:
@@ -3880,6 +3880,14 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
|
||||
cudaOptions.AddFlag("CudaRuntime", "None");
|
||||
}
|
||||
|
||||
if (this->ProjectType == VsProjectType::vcxproj && this->MSTools) {
|
||||
// Suppress inheritance of host compiler optimization flags
|
||||
// when the project does not specify any optimization flags for CUDA.
|
||||
if (!cudaOptions.HasFlag("Optimization")) {
|
||||
cudaOptions.AddFlag("Optimization", "");
|
||||
}
|
||||
}
|
||||
|
||||
this->CudaOptions[configName] = std::move(pOptions);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user