summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-12-13 17:19:59 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-12-13 17:19:59 (GMT)
commit5d11564c35b7c7f7a578e848b926a63746c3bcf3 (patch)
tree0abed46cb0dc0ad9f3d458d43188958cb15f9f63 /Source/cmMakefile.cxx
parente1a142f033f3842e19cd207c32fad384a0384772 (diff)
downloadCMake-5d11564c35b7c7f7a578e848b926a63746c3bcf3.zip
CMake-5d11564c35b7c7f7a578e848b926a63746c3bcf3.tar.gz
CMake-5d11564c35b7c7f7a578e848b926a63746c3bcf3.tar.bz2
ENH: allow source file properties to chain to Directories and up
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4054bdf..eb16809 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2281,7 +2281,7 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
// we must create one
cmSourceFile file;
- file.GetProperties().SetCMakeInstance(this->GetCMakeInstance());
+ file.SetMakefile(this);
std::string path = cmSystemTools::GetFilenamePath(src);
if(generated)
{
@@ -2329,12 +2329,15 @@ cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName,
this->AddSource(file);
src = file.GetFullPath();
ret = this->GetSource(src.c_str());
- ret->GetProperties().SetCMakeInstance(this->GetCMakeInstance());
if (!ret)
{
cmSystemTools::Error(
"CMake failed to properly look up cmSourceFile: ", sourceName);
}
+ else
+ {
+ ret->SetMakefile(this);
+ }
return ret;
}