summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 7775f62..88ca92d 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -157,21 +157,14 @@ void cmVisualStudioGeneratorOptions::FixCudaRuntime(cmGeneratorTarget* target)
this->FlagMap.find("CudaRuntime");
if (i == this->FlagMap.end()) {
// User didn't provide am override so get the property value
- cmProp runtimeLibraryValue = target->GetProperty("CUDA_RUNTIME_LIBRARY");
- if (runtimeLibraryValue) {
- std::string cudaRuntime =
- cmSystemTools::UpperCase(cmGeneratorExpression::Evaluate(
- *runtimeLibraryValue, this->LocalGenerator, this->Configuration,
- target));
- if (cudaRuntime == "STATIC") {
- this->AddFlag("CudaRuntime", "Static");
- }
- if (cudaRuntime == "SHARED") {
- this->AddFlag("CudaRuntime", "Shared");
- }
- if (cudaRuntime == "NONE") {
- this->AddFlag("CudaRuntime", "None");
- }
+ std::string const& cudaRuntime =
+ target->GetRuntimeLinkLibrary("CUDA", this->Configuration);
+ if (cudaRuntime == "STATIC") {
+ this->AddFlag("CudaRuntime", "Static");
+ } else if (cudaRuntime == "SHARED") {
+ this->AddFlag("CudaRuntime", "Shared");
+ } else if (cudaRuntime == "NONE") {
+ this->AddFlag("CudaRuntime", "None");
} else {
// nvcc default is static
this->AddFlag("CudaRuntime", "Static");