summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-04-29 11:00:00 -0400
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-04-29 10:59:39 -0400
commit36aba01223cfb28ee574386cd91dbfccc4dc9359 (patch)
tree7acf2fc54b9ddf7a5372cb088eb80cde6764408d /Source/cmGlobalVisualStudio7Generator.cxx
parentd63c442a6bcec287afb32a88c80b68cb141f49f4 (diff)
downloadcmake-36aba01223cfb28ee574386cd91dbfccc4dc9359.tar.gz
cmGeneratorTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx25
1 files changed, 13 insertions, 12 deletions
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<std::string> 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<std::string>& 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);
}
}
}