Merge topic 'vs-cuda-forward-host-compiler-flags'

c185998420 VS/CUDA: Forward unknown flags to the host compiler when possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Patrik Huber <patrikhuber@gmail.com>
Merge-request: !11417
This commit is contained in:
Brad King
2025-11-15 14:08:32 +00:00
committed by Kitware Robot
+2 -1
View File
@@ -3872,7 +3872,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
auto cudaVersion = this->GlobalGenerator->GetPlatformToolsetCudaString();
// Get compile flags for CUDA in this directory.
std::string flags;
std::string flags =
this->Makefile->GetSafeDefinition("_CMAKE_CUDA_EXTRA_FLAGS");
this->LocalGenerator->AddLanguageFlags(
flags, this->GeneratorTarget, cmBuildStep::Compile, "CUDA", configName);
this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, "CUDA",