mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-25 07:58:59 -06:00
VS/CUDA: Forward unknown flags to the host compiler when possible
Extend commit 7f15c99851 (CUDA: forward unknown flags to host compiler
when possible, 2019-11-29, v3.17.0-rc1~326^2~1) to work in VS too.
Fixes: #27210
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user