From 3eec21a01cda630f34a4505d66bdbf6d5063ecdc Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Mon, 30 Mar 2020 13:45:00 -0400 Subject: cmTarget::GetProperty: return cmProp --- Source/cmVisualStudio10TargetGenerator.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Source/cmVisualStudio10TargetGenerator.cxx') diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index abc8b6f760..96543e527d 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -877,11 +877,10 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReference( void cmVisualStudio10TargetGenerator::WriteImports(Elem& e0) { - const char* imports = + cmProp imports = this->GeneratorTarget->Target->GetProperty("VS_PROJECT_IMPORT"); if (imports) { - std::vector argsSplit = - cmExpandedList(std::string(imports), false); + std::vector argsSplit = cmExpandedList(*imports, false); for (auto& path : argsSplit) { if (!cmsys::SystemTools::FileIsFullPath(path)) { path = this->Makefile->GetCurrentSourceDirectory() + "/" + path; @@ -1959,11 +1958,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1, } if (ParsedToolTargetSettings.find(tool) == ParsedToolTargetSettings.end()) { - const char* toolTargetProperty = - this->GeneratorTarget->Target->GetProperty("VS_SOURCE_SETTINGS_" + - std::string(tool)); + cmProp toolTargetProperty = this->GeneratorTarget->Target->GetProperty( + "VS_SOURCE_SETTINGS_" + std::string(tool)); ConfigToSettings toolTargetSettings; - ParseSettingsProperty(toolTargetProperty, toolTargetSettings); + if (toolTargetProperty) { + ParseSettingsProperty(toolTargetProperty->c_str(), toolTargetSettings); + } ParsedToolTargetSettings[tool] = toolTargetSettings; } -- cgit v1.2.1