diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-04-29 15:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-04-29 14:59:39 (GMT) |
commit | 36aba01223cfb28ee574386cd91dbfccc4dc9359 (patch) | |
tree | 7acf2fc54b9ddf7a5372cb088eb80cde6764408d /Source/cmXCodeScheme.cxx | |
parent | d63c442a6bcec287afb32a88c80b68cb141f49f4 (diff) | |
download | CMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.zip CMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.tar.gz CMake-36aba01223cfb28ee574386cd91dbfccc4dc9359.tar.bz2 |
cmGeneratorTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r-- | Source/cmXCodeScheme.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 1b437e9..aab367a 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -204,14 +204,14 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, // Info tab begin - if (const char* exe = + if (cmProp exe = this->Target->GetTarget()->GetProperty("XCODE_SCHEME_EXECUTABLE")) { xout.StartElement("PathRunnable"); xout.BreakAttributes(); xout.Attribute("runnableDebuggingMode", "0"); - xout.Attribute("FilePath", exe); + xout.Attribute("FilePath", *exe); xout.EndElement(); // PathRunnable } @@ -220,9 +220,9 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, // Arguments tab begin - if (const char* argList = + if (cmProp argList = this->Target->GetTarget()->GetProperty("XCODE_SCHEME_ARGUMENTS")) { - std::vector<std::string> arguments = cmExpandedList(argList); + std::vector<std::string> arguments = cmExpandedList(*argList); if (!arguments.empty()) { xout.StartElement("CommandLineArguments"); @@ -240,9 +240,9 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, } } - if (const char* envList = + if (cmProp envList = this->Target->GetTarget()->GetProperty("XCODE_SCHEME_ENVIRONMENT")) { - std::vector<std::string> envs = cmExpandedList(envList); + std::vector<std::string> envs = cmExpandedList(*envList); if (!envs.empty()) { xout.StartElement("EnvironmentVariables"); @@ -323,8 +323,9 @@ bool cmXCodeScheme::WriteLaunchActionBooleanAttribute( cmXMLWriter& xout, const std::string& attrName, const std::string& varName, bool defaultValue) { - auto property = Target->GetTarget()->GetProperty(varName); - bool isOn = (property == nullptr && defaultValue) || cmIsOn(property); + cmProp property = Target->GetTarget()->GetProperty(varName); + bool isOn = + (property == nullptr && defaultValue) || (property && cmIsOn(*property)); if (isOn) { xout.Attribute(attrName.c_str(), "YES"); |