[cmake-commits] king committed cmFLTKWrapUICommand.cxx 1.35 1.36 cmLocalGenerator.cxx 1.225 1.226 cmTarget.cxx 1.146 1.147 cmTarget.h 1.85 1.86

cmake-commits at cmake.org cmake-commits at cmake.org
Mon May 28 10:25:05 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14842/Source

Modified Files:
	cmFLTKWrapUICommand.cxx cmLocalGenerator.cxx cmTarget.cxx 
	cmTarget.h 
Log Message:
ENH: Made cmTarget::GetSourceFiles method return reference to const so addition of cmSourceFile pointers must be done with an access method in cmTarget.


Index: cmFLTKWrapUICommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFLTKWrapUICommand.cxx,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cmFLTKWrapUICommand.cxx	28 May 2007 14:11:44 -0000	1.35
+++ cmFLTKWrapUICommand.cxx	28 May 2007 14:25:03 -0000	1.36
@@ -158,8 +158,8 @@
     // Generate code for all the .fl files
     for(size_t classNum = 0; classNum < lastHeadersClass; classNum++)
       {
-      this->Makefile->GetTargets()[this->Target].GetSourceFiles().
-        push_back(this->GeneratedSourcesClasses[classNum]);
+      this->Makefile->GetTargets()[this->Target]
+        .AddSourceFile(this->GeneratedSourcesClasses[classNum]);
       }
     }
 }

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- cmLocalGenerator.cxx	24 May 2007 12:43:31 -0000	1.225
+++ cmLocalGenerator.cxx	28 May 2007 14:25:03 -0000	1.226
@@ -622,8 +622,8 @@
   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 @@
     comment.c_str(),
     this->Makefile->GetStartOutputDirectory()
     );
-  target.GetSourceFiles().push_back
+  target.AddSourceFile
     (this->Makefile->GetSource(targetFullPath.c_str()));
 }
 

Index: cmTarget.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.h,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- cmTarget.h	28 May 2007 13:59:08 -0000	1.85
+++ cmTarget.h	28 May 2007 14:25:03 -0000	1.86
@@ -89,7 +89,9 @@
   /**
    * Get the list of the source files used by this target
    */
-  std::vector<cmSourceFile*> &GetSourceFiles() {return this->SourceFiles;}
+  std::vector<cmSourceFile*> const &GetSourceFiles()
+    {return this->SourceFiles;}
+  void AddSourceFile(cmSourceFile* sf) { this->SourceFiles.push_back(sf); }
 
   /**
    * Get the list of the source files used by this target

Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- cmTarget.cxx	24 May 2007 12:43:31 -0000	1.146
+++ cmTarget.cxx	28 May 2007 14:25:03 -0000	1.147
@@ -454,7 +454,7 @@
                                    cmMakefile *makefile)
 { 
   // get the classes from the source lists then add them to the groups
-  std::vector<cmSourceFile*> & classes = this->GetSourceFiles();
+  std::vector<cmSourceFile*> & classes = this->SourceFiles;
   // use a deck to keep track of processed source files
   std::queue<std::string> srcFilesToProcess;
   std::set<cmStdString> srcFilesQueued;



More information about the Cmake-commits mailing list