summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-27 12:20:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-10-27 12:20:55 (GMT)
commitc300355aab387be11c2b7487ea2505e1d81c1831 (patch)
tree5588bae5c339d4fec879392def764fc58b37c932 /Source/cmVisualStudio10TargetGenerator.cxx
parentdbb957a5dc0a6d2af843079a37f7be9be87221b1 (diff)
parentdd77dec18d66a2e20480d9bf2ab06231765720a4 (diff)
downloadCMake-c300355aab387be11c2b7487ea2505e1d81c1831.zip
CMake-c300355aab387be11c2b7487ea2505e1d81c1831.tar.gz
CMake-c300355aab387be11c2b7487ea2505e1d81c1831.tar.bz2
Merge topic 'cuda_vs_skip_computation'
dd77dec18d VS: Don't compute CUDA options unless necessary Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5422
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 0d31c5e..9f6973e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3106,7 +3106,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;
}
}
@@ -3246,7 +3247,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");