diff options
author | Brad King <brad.king@kitware.com> | 2007-05-28 14:25:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-28 14:25:03 (GMT) |
commit | 3f2dd9bc54d1dfc47fcf8e22979e409ad50e875a (patch) | |
tree | a0aa1d56e870d1a6b758de964cf2bcbb9a24868a /Source/cmLocalGenerator.cxx | |
parent | ba8ec0d5cf2efac0107841dfcfb2534852d3bfe7 (diff) | |
download | CMake-3f2dd9bc54d1dfc47fcf8e22979e409ad50e875a.zip CMake-3f2dd9bc54d1dfc47fcf8e22979e409ad50e875a.tar.gz CMake-3f2dd9bc54d1dfc47fcf8e22979e409ad50e875a.tar.bz2 |
ENH: Made cmTarget::GetSourceFiles method return reference to const so addition of cmSourceFile pointers must be done with an access method in cmTarget.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bc0aca4..f831282 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -622,8 +622,8 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) cmStdString objs; std::vector<std::string> objVector; // Add all the sources outputs to the depends of the target - std::vector<cmSourceFile*>& classes = target.GetSourceFiles(); - for(std::vector<cmSourceFile*>::iterator i = classes.begin(); + std::vector<cmSourceFile*> const& classes = target.GetSourceFiles(); + for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); i != classes.end(); ++i) { if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY") && @@ -706,7 +706,7 @@ void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) comment.c_str(), this->Makefile->GetStartOutputDirectory() ); - target.GetSourceFiles().push_back + target.AddSourceFile (this->Makefile->GetSource(targetFullPath.c_str())); } |