summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-11 18:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-11 18:03:03 (GMT)
commit18726ad634d0f182940d45e9f569000cebcc4377 (patch)
tree89e7eea76cb7226f58c8a567a24b9ccc7533d0db /Source/cmGeneratorTarget.cxx
parentfd1df4995b6c1e063bb978e034a264b0e2d59f63 (diff)
downloadCMake-18726ad634d0f182940d45e9f569000cebcc4377.zip
CMake-18726ad634d0f182940d45e9f569000cebcc4377.tar.gz
CMake-18726ad634d0f182940d45e9f569000cebcc4377.tar.bz2
GetFeature(): return cmProp
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ccd8e7e..a14c864 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -815,18 +815,18 @@ void cmGeneratorTarget::ComputeObjectMapping()
}
}
-const char* cmGeneratorTarget::GetFeature(const std::string& feature,
- const std::string& config) const
+cmProp cmGeneratorTarget::GetFeature(const std::string& feature,
+ const std::string& config) const
{
if (!config.empty()) {
std::string featureConfig =
cmStrCat(feature, '_', cmSystemTools::UpperCase(config));
if (cmProp value = this->GetProperty(featureConfig)) {
- return value->c_str();
+ return value;
}
}
if (cmProp value = this->GetProperty(feature)) {
- return value->c_str();
+ return value;
}
return this->LocalGenerator->GetFeature(feature, config);
}
@@ -853,8 +853,8 @@ const char* cmGeneratorTarget::GetLinkPIEProperty(
bool cmGeneratorTarget::IsIPOEnabled(std::string const& lang,
std::string const& config) const
{
- const char* feature = "INTERPROCEDURAL_OPTIMIZATION";
- const bool result = cmIsOn(this->GetFeature(feature, config));
+ cmProp feature = this->GetFeature("INTERPROCEDURAL_OPTIMIZATION", config);
+ const bool result = feature && cmIsOn(*feature);
if (!result) {
// 'INTERPROCEDURAL_OPTIMIZATION' is off, no need to check policies