|
@@ -3078,7 +3078,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;
|
|
|
}
|
|
|
}
|
|
@@ -3218,7 +3219,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");
|