summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
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 4b8010a..428c748 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);
}
}
}