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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user