From 36aba01223cfb28ee574386cd91dbfccc4dc9359 Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Wed, 29 Apr 2020 11:00:00 -0400 Subject: cmGeneratorTarget::GetProperty: return cmProp --- Source/cmGlobalVisualStudio7Generator.cxx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'Source/cmGlobalVisualStudio7Generator.cxx') diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 4b8010a392..428c748633 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -342,19 +342,19 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } - const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); + cmProp expath = target->GetProperty("EXTERNAL_MSPROJECT"); if (expath) { std::set allConfigurations(configs.begin(), configs.end()); - const char* mapping = target->GetProperty("VS_PLATFORM_MAPPING"); + cmProp mapping = target->GetProperty("VS_PLATFORM_MAPPING"); this->WriteProjectConfigurations(fout, target->GetName(), *target, configs, allConfigurations, - mapping ? mapping : ""); + mapping ? *mapping : ""); } else { const std::set& configsPartOfDefaultBuild = this->IsPartOfDefaultBuild(configs, projectTargets, target); - const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); + cmProp vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); if (vcprojName) { - this->WriteProjectConfigurations(fout, vcprojName, *target, configs, + this->WriteProjectConfigurations(fout, *vcprojName, *target, configs, configsPartOfDefaultBuild); } } @@ -375,17 +375,18 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( bool written = false; // handle external vc project files - const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); + cmProp expath = target->GetProperty("EXTERNAL_MSPROJECT"); if (expath) { std::string project = target->GetName(); - std::string location = expath; + std::string location = *expath; + cmProp p = target->GetProperty("VS_PROJECT_TYPE"); this->WriteExternalProject(fout, project, location, - target->GetProperty("VS_PROJECT_TYPE"), + p ? p->c_str() : nullptr, target->GetUtilities()); written = true; } else { - const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); + cmProp vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); if (vcprojName) { cmLocalGenerator* lg = target->GetLocalGenerator(); std::string dir = lg->GetCurrentBinaryDirectory(); @@ -393,7 +394,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( if (dir == ".") { dir.clear(); // msbuild cannot handle ".\" prefix } - this->WriteProject(fout, vcprojName, dir, target); + this->WriteProject(fout, *vcprojName, dir, target); written = true; } } @@ -438,11 +439,11 @@ void cmGlobalVisualStudio7Generator::WriteTargetDepends( if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } - const char* vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); + cmProp vcprojName = target->GetProperty("GENERATOR_FILE_NAME"); if (vcprojName) { std::string dir = target->GetLocalGenerator()->GetCurrentSourceDirectory(); - this->WriteProjectDepends(fout, vcprojName, dir.c_str(), target); + this->WriteProjectDepends(fout, *vcprojName, dir, target); } } } -- cgit v1.2.1