diff options
author | Brad King <brad.king@kitware.com> | 2007-05-28 14:11:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-28 14:11:44 (GMT) |
commit | ba8ec0d5cf2efac0107841dfcfb2534852d3bfe7 (patch) | |
tree | 5f02684355fcaecf75af6ef43f8c3218a441134a /Source | |
parent | d2f62e6ac35a742a762ab6e493cdb4914e6ed1ab (diff) | |
download | CMake-ba8ec0d5cf2efac0107841dfcfb2534852d3bfe7.zip CMake-ba8ec0d5cf2efac0107841dfcfb2534852d3bfe7.tar.gz CMake-ba8ec0d5cf2efac0107841dfcfb2534852d3bfe7.tar.bz2 |
ENH: Made cmSourceFile::GetDepends return reference to const so dependencies can be added only by an access method in cmSourceFile.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 2 | ||||
-rw-r--r-- | Source/cmFLTKWrapUICommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmQTWrapCPPCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmQTWrapUICommand.cxx | 8 | ||||
-rw-r--r-- | Source/cmSourceFile.h | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index fc442a1..dff6035 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -555,7 +555,7 @@ void CCONV cmSourceFileSetProperty(void *arg,const char *prop, void CCONV cmSourceFileAddDepend(void *arg, const char *depend) { cmSourceFile *sf = static_cast<cmSourceFile *>(arg); - sf->GetDepends().push_back(depend); + sf->AddDepend(depend); } void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir, diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 6b2d611..f761a59 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -94,8 +94,8 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args) no_working_dir); cmSourceFile *sf = this->Makefile->GetSource(cxxres.c_str()); - sf->GetDepends().push_back(hname); - sf->GetDepends().push_back(origname); + sf->AddDepend(hname.c_str()); + sf->AddDepend(origname.c_str()); this->GeneratedSourcesClasses.push_back(sf); } } diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index 8a590a7..19033f8 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -82,7 +82,7 @@ bool cmQTWrapCPPCommand::InitialPass(std::vector<std::string> const& argsIn) } this->WrapHeaders.push_back(hname); // add starting depends - file.GetDepends().push_back(hname); + file.AddDepend(hname.c_str()); this->WrapClasses.push_back(file); if (sourceListValue.size() > 0) { diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index 9bec97f..2f7982d 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -86,10 +86,10 @@ bool cmQTWrapUICommand::InitialPass(std::vector<std::string> const& argsIn) std::string hname = header_file.GetFullPath(); this->WrapUserInterface.push_back(origname); // add starting depends - moc_file.GetDepends().push_back(hname); - source_file.GetDepends().push_back(hname); - source_file.GetDepends().push_back(origname); - header_file.GetDepends().push_back(origname); + moc_file.AddDepend(hname.c_str()); + source_file.AddDepend(hname.c_str()); + source_file.AddDepend(origname.c_str()); + header_file.AddDepend(origname.c_str()); this->WrapHeadersClasses.push_back(header_file); this->WrapSourcesClasses.push_back(source_file); this->WrapMocClasses.push_back(moc_file); diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 7f00483..f25aa66 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -102,7 +102,7 @@ public: * Return the vector that holds the list of dependencies */ const std::vector<std::string> &GetDepends() const {return this->Depends;} - std::vector<std::string> &GetDepends() {return this->Depends;} + void AddDepend(const char* d) { this->Depends.push_back(d); } /** * Get the source name without last extension |