summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-06 07:41:30 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-07 07:29:31 (GMT)
commit5181fae264444ad7736614ceb1e78c51def2b97c (patch)
tree6c0577c3bc103de8eef07431260fcb5d1f495d43 /Source/cmSourceFile.cxx
parent3ac4b90bfdcca97f1f63056c97afee38cf66ea12 (diff)
downloadCMake-5181fae264444ad7736614ceb1e78c51def2b97c.zip
CMake-5181fae264444ad7736614ceb1e78c51def2b97c.tar.gz
CMake-5181fae264444ad7736614ceb1e78c51def2b97c.tar.bz2
cmPropertyMap: Remove chaining logic.
The chaining logic doesn't belong to the container, and the CMakeInstance pointer doesn't need to be in cmPropertyMap. Size goes from 56 to 48 bytes with GNU libstdc++-5.1.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index df511d8..86f0a7a 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -22,7 +22,6 @@ cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name):
Location(mf, name)
{
this->CustomCommand = 0;
- this->Properties.SetCMakeInstance(mf->GetCMakeInstance());
this->FindFullPathFailed = false;
this->IsUiFile = (".ui" ==
cmSystemTools::GetFilenameLastExtension(this->Location.GetName()));
@@ -361,13 +360,16 @@ const char* cmSourceFile::GetProperty(const std::string& prop) const
}
}
- bool chain = false;
- const char *retVal =
- this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain);
- if (chain)
+ const char *retVal = this->Properties.GetPropertyValue(prop);
+ if (!retVal)
{
cmMakefile const* mf = this->Location.GetMakefile();
- return mf->GetProperty(prop,cmProperty::SOURCE_FILE);
+ const bool chain = mf->GetState()->
+ IsPropertyChained(prop, cmProperty::SOURCE_FILE);
+ if (chain)
+ {
+ return mf->GetProperty(prop, chain);
+ }
}
return retVal;