1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

VS: Compute MSVC character set in CUDA-only targets

Fix commit 6874efb592 (MSVC: Always define a character set, 2025-09-24)
for CUDA in Visual Studio.
This commit is contained in:
Brad King
2025-10-10 16:54:09 -04:00
parent 19a61e56cf
commit 614d295c1e

View File

@@ -4021,6 +4021,10 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
cudaOptions.AddFlag("CudaRuntime", "None");
}
if (cm::optional<MsvcCharSet> charSet = cudaOptions.GetCharSet()) {
this->CharSet.emplace(configName, *charSet);
}
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.