diff options
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index f58c6fd..2ea2839 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3018,7 +3018,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions() return true; } for (std::string const& c : this->Configurations) { - if (!this->ComputeCudaOptions(c)) { + if (this->GeneratorTarget->IsLanguageUsed("CUDA", c) && + !this->ComputeCudaOptions(c)) { return false; } } @@ -3158,7 +3159,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( void cmVisualStudio10TargetGenerator::WriteCudaOptions( Elem& e1, std::string const& configName) { - if (!this->MSTools || !this->GlobalGenerator->IsCudaEnabled()) { + if (!this->MSTools || !this->GlobalGenerator->IsCudaEnabled() || + !this->GeneratorTarget->IsLanguageUsed("CUDA", configName)) { return; } Elem e2(e1, "CudaCompile"); |