[Cmake-commits] [cmake-commits] king committed cmMakeDepend.cxx 1.46 1.47 cmMakeDepend.h 1.24 1.25

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 16 14:30:21 EDT 2009


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

Modified Files:
	cmMakeDepend.cxx cmMakeDepend.h 
Log Message:
ENH: Remove unused code from cmMakeDepend

This class is the old-style dependency scanner.  It is needed only to
implement the output_required_files command.  This change removes some
code not needed for that purpose, including a reference to the
HEADER_FILE_ONLY property.


Index: cmMakeDepend.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakeDepend.cxx,v
retrieving revision 1.46
retrieving revision 1.47
diff -C 2 -d -r1.46 -r1.47
*** cmMakeDepend.cxx	15 Dec 2007 01:31:27 -0000	1.46
--- cmMakeDepend.cxx	16 Mar 2009 18:30:19 -0000	1.47
***************
*** 265,292 ****
  
  
- void cmMakeDepend::GenerateMakefileDependencies()
- {
-   // Now create cmDependInformation objects for files in the directory
-   cmTargets &tgts = this->Makefile->GetTargets();
-   for(cmTargets::iterator l = tgts.begin(); 
-       l != tgts.end(); l++)
-     {
-     const std::vector<cmSourceFile*> &classes = l->second.GetSourceFiles();
-     for(std::vector<cmSourceFile*>::const_iterator i = classes.begin();
-         i != classes.end(); ++i)
-       {
-       if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY"))
-         {
-         cmDependInformation* info =
-           this->GetDependInformation((*i)->GetFullPath().c_str(),0);
-         this->AddFileToSearchPath(info->FullPath.c_str());
-         info->SourceFile = *i;
-         this->GenerateDependInformation(info);
-         }
-       }
-     }
- }
- 
- 
  // find the full path to fname by searching the this->IncludeDirectories array
  std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
--- 265,268 ----
***************
*** 363,398 ****
    this->IncludeDirectories.push_back(path);
  }
- 
- // Add a directory to the search path
- void cmMakeDepend::AddFileToSearchPath(const char* file)
- {
-   std::string filepath = file;
-   std::string::size_type pos = filepath.rfind('/');
-   if(pos != std::string::npos)
-     {
-     std::string path = filepath.substr(0, pos);
-     if(std::find(this->IncludeDirectories.begin(),
-                  this->IncludeDirectories.end(), path)
-        == this->IncludeDirectories.end())
-       {
-       this->IncludeDirectories.push_back(path);
-       return;
-       }
-     }
- }
- 
- const cmDependInformation*
- cmMakeDepend::GetDependInformationForSourceFile(const cmSourceFile &sf) const
- {
-   for(DependInformationMapType::const_iterator i = 
-         this->DependInformationMap.begin();
-       i != this->DependInformationMap.end(); ++i)
-     {
-     const cmDependInformation* info = i->second;
-     if(info->SourceFile == &sf)
-       {
-       return info;
-       }
-     }
-   return 0;
- }
--- 339,340 ----

Index: cmMakeDepend.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakeDepend.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -C 2 -d -r1.24 -r1.25
*** cmMakeDepend.h	12 May 2006 16:29:09 -0000	1.24
--- cmMakeDepend.h	16 Mar 2009 18:30:19 -0000	1.25
***************
*** 97,106 ****
    virtual void SetMakefile(cmMakefile* makefile); 
  
-   /** 
-    * Get the depend info struct for a source file
-    */
-   const cmDependInformation 
-   *GetDependInformationForSourceFile(const cmSourceFile &sf) const;
- 
    /**
     * Add a directory to the search path for include files.
--- 97,100 ----
***************
*** 109,118 ****
  
    /**
-    * Generate dependencies for all the sources of all the targets
-    * in the makefile.
-    */
-   void GenerateMakefileDependencies();
- 
-   /**
     * Generate dependencies for the file given.  Returns a pointer to
     * the cmDependInformation object for the file.
--- 103,106 ----
***************
*** 120,129 ****
    const cmDependInformation* FindDependencies(const char* file);
  
! protected: 
!   /**
!    * Add a source file to the search path.
!    */
!   void AddFileToSearchPath(const char* filepath);
! 
    /**
     * Compute the depend information for this class.
--- 108,112 ----
    const cmDependInformation* FindDependencies(const char* file);
  
! protected:
    /**
     * Compute the depend information for this class.



More information about the Cmake-commits mailing list