summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a14c864..9e6f995 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5411,8 +5411,7 @@ bool getTypedProperty<bool>(cmGeneratorTarget const* tgt,
}
cmProp value = tgt->GetProperty(prop);
- return cmIsOn(
- genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop));
+ return cmIsOn(genexInterpreter->Evaluate(value ? *value : "", prop));
}
template <>
@@ -5426,8 +5425,7 @@ const char* getTypedProperty<const char*>(
return value ? value->c_str() : nullptr;
}
- return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop)
- .c_str();
+ return genexInterpreter->Evaluate(value ? *value : "", prop).c_str();
}
template <>
@@ -5441,7 +5439,7 @@ std::string getTypedProperty<std::string>(
return valueAsString(value ? value->c_str() : nullptr);
}
- return genexInterpreter->Evaluate(value ? value->c_str() : nullptr, prop);
+ return genexInterpreter->Evaluate(value ? *value : "", prop);
}
template <typename PropertyType>