summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-08-04 13:08:17 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-08-08 14:19:08 (GMT)
commite5cd39ca80c8c234118ded33a1576c1be281aa9e (patch)
tree0494dad04188959dd6cefc9497688718ff88006b /Source/cmVisualStudio10TargetGenerator.cxx
parent350065bb855a26692ed6af04870f144ae1f6a886 (diff)
downloadCMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.zip
CMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.tar.gz
CMake-e5cd39ca80c8c234118ded33a1576c1be281aa9e.tar.bz2
cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties, introduce the class cmProp as a replacement from the simple pointer to std::string instance.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 065601b..03d1bbb 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -490,10 +490,7 @@ void cmVisualStudio10TargetGenerator::Generate()
e1.Element("Platform", this->Platform);
cmProp projLabel = this->GeneratorTarget->GetProperty("PROJECT_LABEL");
- if (!projLabel) {
- projLabel = &this->Name;
- }
- e1.Element("ProjectName", *projLabel);
+ e1.Element("ProjectName", projLabel ? projLabel : this->Name);
{
cmProp targetFramework =
this->GeneratorTarget->GetProperty("DOTNET_TARGET_FRAMEWORK");