summaryrefslogtreecommitdiff
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:21 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:21 +0900
commit2cae257828342914a3573b14d86b7abc5a77fe3d (patch)
treed5b38c9a5891bfc428274d3fa993301ff13178c6 /Source/cmVisualStudio10TargetGenerator.cxx
parent50689498d1ad916f12dc24a034014fe5e4cb9904 (diff)
downloadcmake-2cae257828342914a3573b14d86b7abc5a77fe3d.tar.gz
cmake-2cae257828342914a3573b14d86b7abc5a77fe3d.tar.bz2
cmake-2cae257828342914a3573b14d86b7abc5a77fe3d.zip
Imported Upstream version 3.18.5upstream/3.18.5
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f58c6fd71..2ea28393e 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");